Main Page | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

DefaultAuth.class.php

Go to the documentation of this file.
00001 <?php
00006 include_once("core/auth/IAuthSystem.class.php");
00007 include_once("core/system/User.class.php");
00008 include_once("core/system/JUgrSystem.class.php");
00009 
00013 class DefaultAuth extends IAuthSystem
00014 {
00019         function DefaultAuth()
00020         {
00021         }
00022         
00027         function Authenticate($login, $pass)
00028         {
00029                 $result = false;
00030                 
00031                 // We get the user information
00032                 $jugr =& JUgrSystem::GetInstance();
00033                 $user = $jugr->GetUser($login);
00034 
00035                 // If the user is valid...
00036                 if (! JSystem::IsError($user))
00037                 {
00038                         // And also the password...
00039                         if ($user->IsPassword($pass))
00040                         {
00041                                 // return true
00042                                 $result = true;
00043                         }
00044                 }
00045                 
00046                 return $result;
00047         }
00048 }
00049 ?>

Generated on Wed Nov 19 20:29:34 2003 for James by doxygen 1.3.4