Umfragen
|
Public Member Functions | |
__construct ($server, $port, $root_dn, $username="", $password="") | |
connects the object to authentification | |
auth ($user, $pass) | |
authentificates a user and sets some public variables | |
info ($user) | |
gets an array of informations about a user | |
info_ID ($ID) | |
gets an array of informations about a user | |
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_all_users_from_projectlist ($projects) | |
gets a list of users belonging to given projects | |
get_gid_to_name_mapping ($whitelist=array()) | |
gets an mapping array from all groupIDs to groupNames | |
get_projects_for_user ($user) | |
a list of projects a certain user belongs to |
Data Fields | |
$userFullName | |
users's full name | |
$userName | |
user's username | |
$userGroupID | |
user's group ID | |
$userDN | |
user's DN | |
$userID | |
user's user ID | |
$projects = array() | |
user's projects | |
$success | |
true if success, false if there is a critical error | |
$reason | |
the reason of the critical error | |
$groups | |
the group list the user is belonging to |
Private Member Functions | |
connect () | |
connects to the LDAP server and creates the connection object | |
auto_connect () | |
connects if not connected to the ldap server | |
get_user_info ($user) | |
gets an array of informations about a user | |
get_user_info_from_ID ($ID) | |
gets an array of informations about a user | |
search_for_userdn ($user) | |
gets the LDAP DN for a username |
Private Attributes | |
$ds | |
LDAP connection object. | |
$server | |
LDAP server string (eg. localhost) | |
$port | |
server port | |
$root_dn | |
the root DN of the LDAPtree |
Definition at line 90 of file auth.class.php.
__construct | ( | $server, | |
$port, | |||
$location, | |||
$username = "" , |
|||
$password = "" |
|||
) |
connects the object to authentification
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 |
Implements auth.
Definition at line 108 of file auth.class.php.
auth | ( | $user, | |
$pass | |||
) |
authentificates a user and sets some public variables
string | $user | user's username |
string | $pass | users's password |
Implements auth.
Definition at line 251 of file auth.class.php.
|
private |
connects if not connected to the ldap server
Definition at line 135 of file auth.class.php.
|
private |
connects to the LDAP server and creates the connection object
Definition at line 119 of file auth.class.php.
get_all_groups | ( | $whitelist = array() | ) |
gets a list of all groups
array | $whitelist | whitelisted groupnames |
Implements auth.
Definition at line 323 of file auth.class.php.
get_all_users_from_grouplist | ( | $groups | ) |
gets a list of users based on a group list
array | $groups | group names where to get the users from. |
the userinfo arrays returned have following indexes: "fullName", "userName", "groupID", "userID", "givenName" and "surName"
Implements auth.
Definition at line 360 of file auth.class.php.
get_all_users_from_projectlist | ( | $projects | ) |
gets a list of users belonging to given projects
array | $projects | list of groupIDs |
the return array indexes are fullName, userName, groupID, userID, givenName, surName
Definition at line 409 of file auth.class.php.
get_gid_to_name_mapping | ( | $whitelist = array() | ) |
gets an mapping array from all groupIDs to groupNames
array | $whitelist | of allowed groups |
Implements auth.
Definition at line 466 of file auth.class.php.
get_projects_for_user | ( | $user | ) |
a list of projects a certain user belongs to
string | $user | username |
returns a 0-based indexed array of arrays where the index 0 is the groupName and 1 the groupID
Definition at line 482 of file auth.class.php.
|
private |
gets an array of informations about a user
Projects are given by 0-based array of arrays where index 0 is the groupname and 1 the groupID
string | $user | the username to search about |
the return array indexes are: "dn","fullName","userName","groupID","userID","projects"
Definition at line 154 of file auth.class.php.
|
private |
gets an array of informations about a user
Projects are given by 0-based array of arrays where index 0 is the groupname and 1 the groupID
string | $ID | the numeric user ID |
the return array indexes are: "dn","fullName","userName","groupID","userID","projects"
Definition at line 188 of file auth.class.php.
info | ( | $user | ) |
gets an array of informations about a user
string | $user | the username to search about |
the return array indexes are: "fullName","userName","groupID","userID"
Implements auth.
Definition at line 287 of file auth.class.php.
info_ID | ( | $ID | ) |
gets an array of informations about a user
string | $user | the username to search about |
the return array indexes are: "fullName","userName","groupID","userID"
Implements auth.
Definition at line 311 of file auth.class.php.
|
private |
gets the LDAP DN for a username
string | $user | username |
when | the username were not found |
fills the following private attributes: userFullName, userName,userGroupID, userID, groups, userDN, userGivenName, userSurName
Definition at line 221 of file auth.class.php.
|
private |
LDAP connection object.
Definition at line 91 of file auth.class.php.
$groups |
the group list the user is belonging to
Definition at line 105 of file auth.class.php.
|
private |
server port
Definition at line 93 of file auth.class.php.
$projects = array() |
user's projects
Definition at line 101 of file auth.class.php.
$reason |
the reason of the critical error
Definition at line 104 of file auth.class.php.
|
private |
the root DN of the LDAPtree
Definition at line 94 of file auth.class.php.
|
private |
LDAP server string (eg. localhost)
Definition at line 92 of file auth.class.php.
$success |
true if success, false if there is a critical error
Definition at line 103 of file auth.class.php.
$userDN |
user's DN
Definition at line 99 of file auth.class.php.
$userFullName |
users's full name
Definition at line 96 of file auth.class.php.
$userGroupID |
user's group ID
Definition at line 98 of file auth.class.php.
$userID |
user's user ID
Definition at line 100 of file auth.class.php.
$userName |
user's username
Definition at line 97 of file auth.class.php.