Umfragen
MYSQLauth Class Reference
Inheritance diagram for MYSQLauth:
auth

Public Member Functions

 __construct ($server, $port, $database, $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_gid_to_name_mapping ($whitelist=array())
 gets an mapping array from all groupIDs to groupNames
 make_users_table ()

Data Fields

 $userFullName
 user's full name
 $userName
 user's user name
 $userGroupID
 user's group ID
 $userDN
 users DN (not used here)
 $userID
 user's ID
 $reason
 the reason of the critical error
 $success
 true whe succes, false when a critical error occured

Private Member Functions

 connect ()
 connects to the database Note:not implemented yet

Exceptions
notimplemented

 get_user_info ($username)
 gets an array of informations about a user
 get_user_info_from_ID ($ID)
 gets an array of informations about a user

Private Attributes

 $dbh
 database connection object

Detailed Description

Definition at line 506 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

Implements auth.

Definition at line 517 of file auth.class.php.

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

Implements auth.

Definition at line 628 of file auth.class.php.

connect ( )
private

connects to the database Note:not implemented yet

Exceptions
notimplemented

Definition at line 548 of file auth.class.php.

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

Implements auth.

Definition at line 700 of file auth.class.php.

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"

Implements auth.

Definition at line 728 of file auth.class.php.

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

Implements auth.

Definition at line 765 of file auth.class.php.

get_user_info (   $username)
private

gets an array of informations about a user

Parameters
string$usernamethe username to search about
Returns
array of userinformation

the return array indexes are: "fullName","userName","groupID","userID","password"

Definition at line 559 of file auth.class.php.

get_user_info_from_ID (   $ID)
private

gets an array of informations about a user

Parameters
string$IDthe numerical user ID
Returns
array of userinformation

the return array indexes are: "fullName","userName","groupID","userID","password"

Definition at line 597 of file auth.class.php.

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"

Implements auth.

Definition at line 667 of file auth.class.php.

info_ID (   $ID)

gets an array of informations about a user

Parameters
string$IDthe numerical user ID
Returns
array of userinformation

the return array indexes are: "fullName","userName","groupID","userID"

Implements auth.

Definition at line 687 of file auth.class.php.

make_users_table ( )

Definition at line 778 of file auth.class.php.

Field Documentation

$dbh
private

database connection object

Definition at line 507 of file auth.class.php.

$reason

the reason of the critical error

Definition at line 513 of file auth.class.php.

$success

true whe succes, false when a critical error occured

Definition at line 514 of file auth.class.php.

$userDN

users DN (not used here)

Definition at line 511 of file auth.class.php.

$userFullName

user's full name

Definition at line 508 of file auth.class.php.

$userGroupID

user's group ID

Definition at line 510 of file auth.class.php.

$userID

user's ID

Definition at line 512 of file auth.class.php.

$userName

user's user name

Definition at line 509 of file auth.class.php.


The documentation for this class was generated from the following file: