Umfragen
auth Interface Reference
Inheritance diagram for auth:
LDAPauth MYSQLauth

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$serverserver string to connect to (eg. localhost)
string$portserver port to connect to
string$locationdatabase name or LDAP root DN to connect to
string$usernameusername to connect with
string$passwordusernames password
Returns
bool true

Implemented in MYSQLauth, and LDAPauth.

Member Function Documentation

auth (   $user,
  $pass 
)

authentificates a user and sets some public variables

Parameters
string$useruser's username
string$passusers'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$whitelistwhitelisted 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$groupsgroup 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$whitelistof allowed groups
Returns
array of groupNames indexed by groupID

Implemented in MYSQLauth, and LDAPauth.

info (   $user)

gets an array of informations about a user

Parameters
string$userthe 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.

info_ID (   $ID)

gets an array of informations about a user

Parameters
string$IDthe 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: