home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / CMS / xoops-2.0.18.1.exe / xoops-2.0.18.1 / htdocs / class / auth / auth_xoops.php < prev    next >
Encoding:
PHP Script  |  2006-09-04  |  2.8 KB  |  65 lines

  1. <?php
  2. // $Id: auth_xoops.php 694 2006-09-04 11:33:22Z skalpa $
  3. // auth_xoops.php - XOOPS authentification class 
  4. //  ------------------------------------------------------------------------ //
  5. //                XOOPS - PHP Content Management System                      //
  6. //                    Copyright (c) 2000 XOOPS.org                           //
  7. //                       <http://www.xoops.org/>                             //
  8. //  ------------------------------------------------------------------------ //
  9. //  This program is free software; you can redistribute it and/or modify     //
  10. //  it under the terms of the GNU General Public License as published by     //
  11. //  the Free Software Foundation; either version 2 of the License, or        //
  12. //  (at your option) any later version.                                      //
  13. //                                                                           //
  14. //  You may not change or alter any portion of this comment or credits       //
  15. //  of supporting developers from this source code or any supporting         //
  16. //  source code which is considered copyrighted (c) material of the          //
  17. //  original comment or credit authors.                                      //
  18. //                                                                           //
  19. //  This program is distributed in the hope that it will be useful,          //
  20. //  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
  21. //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
  22. //  GNU General Public License for more details.                             //
  23. //                                                                           //
  24. //  You should have received a copy of the GNU General Public License        //
  25. //  along with this program; if not, write to the Free Software              //
  26. //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
  27. //  ------------------------------------------------------------------------ //
  28. /**
  29.  * @package     kernel
  30.  * @subpackage  auth
  31.  * @description    Authentification class for Native XOOPS
  32.  * @author        Pierre-Eric MENUET    <pemphp@free.fr>
  33.  * @copyright    copyright (c) 2000-2003 XOOPS.org
  34.  */
  35. class XoopsAuthXoops extends XoopsAuth {
  36.  
  37.  
  38.     /**
  39.      * Authentication Service constructor
  40.      */
  41.     function XoopsAuthXoops (&$dao) {
  42.         $this->_dao = $dao;
  43.         $this->auth_method = 'xoops';
  44.     }
  45.  
  46.     /**
  47.      *  Authenticate user
  48.      *
  49.      * @param string $uname
  50.      * @param string $pwd
  51.      *
  52.      * @return bool
  53.      */    
  54.     function authenticate($uname, $pwd = null) {
  55.         $member_handler =& xoops_gethandler('member');
  56.           $user =& $member_handler->loginUser($uname, $pwd);
  57.           if ($user == false) {
  58.               $this->setErrors(1, _US_INCORRECTLOGIN);
  59.           }
  60.           return ($user);
  61.     }
  62.  
  63. }
  64.  
  65. ?>