Public Member Functions |
| __construct ($server, $port, $location, $username="", $password="") |
| connects the object to authentification
|
| auth ($user, $pass) |
| authentificates a user and sets some public variables
|
| get_all_groups ($whitelist=array()) |
| gets a list of all groups
|
| get_all_users_from_grouplist ($groups) |
| gets a list of users based on a group list
|
| get_gid_to_name_mapping ($whitelist=array()) |
| gets an mapping array from all groupIDs to groupNames
|
| info ($user) |
| gets an array of informations about a user
|
| info_ID ($ID) |
| gets an array of informations about a user
|
Detailed Description
Definition at line 25 of file auth.class.php.
Constructor & Destructor Documentation
__construct |
( |
|
$server, |
|
|
|
$port, |
|
|
|
$location, |
|
|
|
$username = "" , |
|
|
|
$password = "" |
|
) |
| |
connects the object to authentification
- Parameters
-
string | $server | server string to connect to (eg. localhost) |
string | $port | server port to connect to |
string | $location | database name or LDAP root DN to connect to |
string | $username | username to connect with |
string | $password | usernames password |
- Returns
- bool true
Implemented in MYSQLauth, and LDAPauth.
Member Function Documentation
authentificates a user and sets some public variables
- Parameters
-
string | $user | user's username |
string | $pass | users's password |
- Returns
- bool true if authentificated else false
Implemented in MYSQLauth, and LDAPauth.
get_all_groups |
( |
|
$whitelist = array() | ) |
|
gets a list of all groups
- Parameters
-
array | $whitelist | whitelisted groupnames |
- Returns
- array alphabetical sorted with array where index 0 is the groupname and 1 the groupID
Implemented in MYSQLauth, and LDAPauth.
get_all_users_from_grouplist |
( |
|
$groups | ) |
|
gets a list of users based on a group list
- Parameters
-
array | $groups | group names where to get the users from. |
- Returns
- array of arrays indexed by userID
the userinfo arrays returned have following indexes: "fullName", "userName", "groupID", "userID", "givenName" and "surName"
Implemented in MYSQLauth, and LDAPauth.
get_gid_to_name_mapping |
( |
|
$whitelist = array() | ) |
|
gets an mapping array from all groupIDs to groupNames
- Parameters
-
array | $whitelist | of allowed groups |
- Returns
- array of groupNames indexed by groupID
Implemented in MYSQLauth, and LDAPauth.
gets an array of informations about a user
- Parameters
-
string | $user | the username to search about |
- Returns
- array of userinformation
the return array indexes are: "fullName","userName","groupID","userID","givenName" and "surName"
Implemented in MYSQLauth, and LDAPauth.
gets an array of informations about a user
- Parameters
-
string | $ID | the numeric user ID |
- Returns
- array of userinformation
the return array indexes are: "fullName","userName","groupID","userID","givenName" and "surName"
Implemented in MYSQLauth, and LDAPauth.
The documentation for this interface was generated from the following file: