Authentification functions.
Class | Description |
---|---|
TimeAuth | PEAR Auth customization |
Login the user using PEAR Auth module
This can be used to login someone, and/or to check if he is logged in. It also includes the code to logout someone since the procedure is very similar. However, it is advised to use logout() to logout the user instead.
To check if a valid auth is there, use the following piece of code:
- if (login(false)) { print "logged in!"; }
To do the actual login and refuse access, with a login screen, if there's no login already:
- login();
login() will not returned if the user is not logged in, and will prompt the user with a password prompt.
logout the current user
This removes the user any credentials he might have
This is actually implemented using login() since a lot of code is common.
get a ecdUsager object out of a Auth sesssion
example:
- require_once('ecdBlueAuth.inc.php');
- $user = user_obj();
- $role = $user->get('role');
Documentation generated on Tue, 11 Jan 2005 01:38:23 -0500 by phpDocumentor 1.3.0RC3