| [ Index ] |
|
Code source de Flux CMS 1.5 |
[Code source] [Imprimer] [Statistiques]
(pas de description)
| Poids: | 952 lignes (27 kb) |
| Inclus ou requis: | 0 fois |
| Référencé: | 0 fois |
| Nécessite: | 1 fichier inc/PEAR.php |
Auth:: (30 méthodes):
Auth()
_factory()
assignData()
start()
login()
setExpire()
setIdle()
setSessionname()
setShowLogin()
setLoginCallback()
setFailedLoginCallback()
setLogoutCallback()
setAuthData()
getAuthData()
setAuth()
setAdvancedSecurity()
checkAuth()
getAuth()
drawLogin()
logout()
updateIdle()
getUsername()
getUserId()
getStatus()
sessionValidThru()
listUsers()
addUser()
removeUser()
changePassword()
_importGlobalVariable()
| Auth($storageDriver, $options = '', $loginFunction = '', $showLogin = true) X-Ref |
| Constructor Set up the storage driver. param: string Type of the storage driver param: mixed Additional options for the storage driver param: string Name of the function that creates the login form param: boolean Should the login form be displayed if neccessary? return: void |
| _factory($driver, $options = '') X-Ref |
| Return a storage driver based on $driver and $options param: string $driver Type of storage class to return param: string $options Optional parameters for the storage class return: object Object Storage object |
| assignData() X-Ref |
| Assign data from login form to internal values This function takes the values for username and password from $HTTP_POST_VARS/$_POST and assigns them to internal variables. If you wish to use another source apart from $HTTP_POST_VARS/$_POST, you have to derive this function. return: void |
| start() X-Ref |
| Start new auth session return: void |
| login() X-Ref |
| Login function return: void |
| setExpire($time, $add = false) X-Ref |
| Set the maximum expire time param: integer time in seconds param: bool add time to current expire time or not return: void |
| setIdle($time, $add = false) X-Ref |
| Set the maximum idle time param: integer time in seconds param: bool add time to current maximum idle time or not return: void |
| setSessionname($name = 'PHPSESSID') X-Ref |
| Set name of the session to a customized value. If you are using multiple instances of PEAR::Auth on the same domain, you can change the name of session per application via this function. param: string New name for the session return: void |
| setShowLogin($showLogin = true) X-Ref |
| Should the login form be displayed if neccessary? param: bool show login form or not return: void |
| setLoginCallback($loginCallback) X-Ref |
| Register a callback function to be called on user login. The function will receive two parameters, the username and a reference to the auth object. param: string callback function name return: void |
| setFailedLoginCallback($loginFailedCallback) X-Ref |
| Register a callback function to be called on failed user login. The function will receive a single parameter, the username and a reference to the auth object. param: string callback function name return: void |
| setLogoutCallback($logoutCallback) X-Ref |
| Register a callback function to be called on user logout. The function will receive three parameters, the username and a reference to the auth object. param: string callback function name return: void |
| setAuthData($name, $value, $overwrite = true) X-Ref |
| Register additional information that is to be stored in the session. param: string Name of the data field param: mixed Value of the data field param: boolean Should existing data be overwritten? (default return: void |
| getAuthData($name = null) X-Ref |
| Get additional information that is stored in the session. If no value for the first parameter is passed, the method will return all data that is currently stored. param: string Name of the data field return: mixed Value of the data field. |
| setAuth($username) X-Ref |
| Register variable in a session telling that the user has logged in successfully param: string Username return: void |
| setAdvancedSecurity($flag=true) X-Ref |
| Pas de description |
| checkAuth() X-Ref |
| Checks if there is a session with valid auth information. return: boolean Whether or not the user is authenticated. |
| getAuth() X-Ref |
| Has the user been authenticated? return: bool True if the user is logged in, otherwise false. |
| drawLogin($username = '') X-Ref |
| Draw the login form Normally you will not use this output in your application, because you can pass a different function name to the constructor. For more information on this, please consult the documentation. param: string Username if already entered return: void |
| logout() X-Ref |
| Logout function This function clears any auth tokens in the currently active session and executes the logout callback function, if any return: void |
| updateIdle() X-Ref |
| Update the idletime return: void |
| getUsername() X-Ref |
| Get the username return: string |
| getUserId() X-Ref |
| Pas de description |
| getStatus() X-Ref |
| Get the current status return: string |
| sessionValidThru() X-Ref |
| Returns the time up to the session is valid return: integer |
| listUsers() X-Ref |
| List all users that are currently available in the storage container return: array |
| addUser($username, $password, $additional = '') X-Ref |
| Add user to the storage container param: string Username param: string Password param: mixed Additional parameters return: mixed True on success, PEAR error object on error |
| removeUser($username) X-Ref |
| Remove user from the storage container param: string Username return: mixed True on success, PEAR error object on error |
| changePassword($username, $password) X-Ref |
| Change password for user in the storage container param: string Username param: string The new password return: mixed True on success, PEAR error object on error |
| _importGlobalVariable($variable) X-Ref |
| Import variables from special namespaces. param: string Type of variable (server, session, post) return: array |
| Généré le : Wed Nov 21 13:08:55 2007 | par Balluche grâce à PHPXref 0.7 |
|