| [ Index ] |
|
Code source de Dolibarr 2.0.1 |
[Code source] [Imprimer] [Statistiques]
(pas de description)
| Poids: | 816 lignes (21 kb) |
| Inclus ou requis: | 2 fois |
| Référencé: | 0 fois |
| Nécessite: | 0 fichiers |
DOLIAuth:: (26 méthodes):
DOLIAuth()
_factory()
assignData()
start()
login()
setExpire()
setIdle()
setSessionname()
setShowLogin()
setLoginCallback()
setLogoutCallback()
setAuthData()
getAuthData()
setAuth()
checkAuth()
getAuth()
drawLogin()
logout()
updateIdle()
getUsername()
getStatus()
sessionValidThru()
listUsers()
addUser()
removeUser()
_importGlobalVariable()
| DOLIAuth($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 and assigns them to internal variables. If you wish to use another source apart from $HTTP_POST_VARS, 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 a single parameter, the username. 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 a single parameter, the username. 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 |
| 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 |
| 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 |
| _importGlobalVariable($variable) X-Ref |
| Import variables from special namespaces. param: string Type of variable (server, session, post) return: array |
| Généré le : Mon Nov 26 12:29:37 2007 | par Balluche grâce à PHPXref 0.7 |
|