Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
Class.freedomProvider.php
Go to the documentation of this file.
1 <?php
2 /*
3  * @author Anakeen
4  * @package FDL
5 */
6 /**
7  * freedomProvider class
8  *
9  * This class provides methods for autentication based on freeedom
10  * @author Anakeen
11  * @version $Id: $
12  * @package FDL
13  */
14 /**
15  */
16 include_once ("WHAT/Class.Provider.php");
17 
19 {
20  /**
21  * checks user login and password
22  *
23  * @param string $username user login
24  * @param string $password user password
25  * @return bool true if ok
26  */
27  public function validateCredential($username, $password)
28  {
29  $user = new User();
30  if ($user->setLoginName($username)) {
31  return $user->checkpassword($password);
32  }
33  return FALSE;
34  }
35 }
validateCredential($username, $password)
← centre documentaire © anakeen