SGlobalAuthModule Class Reference

Handle authentication of a user to the Public or ldap realm. More...

Inheritance diagram for SGlobalAuthModule:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 __construct ()
 INSERT BRIEF DESCRIPTION HERE.
 __sleep ()
 INSERT BRIEF DESCRIPTION HERE.
 __wakeup ()
 INSERT BRIEF DESCRIPTION HERE.
 authenticate ($username, $password)
 Attempt to authenticate this module with a Global Authentication Database username and password.
 getEmail ()
 Gets user email address.
 getFirstName ()
 Gets user first name.
 getGroups ()
 Gets groups user is in.
 getLastName ()
 Gets user last name.
 getLdap ()
 Gets ldap connection.
 getLdapUID ()
 Gets ldap user id.
 getPermissions ()
 Not Yet Implemented.
 getProjects ()
 Gets projects user is in.
 getRole ()
 Gets role of user.
 getUID ()
 Gets authentication database user id.
 getUser ()
 Gets authentication database user object.
 inProject ($project)
 Checks if user is in a project.
 requireProjects ($projects, $redirect=null)
 Requires user to be in projects.
 syncUserWithLdap ()
 Syncs user information with ldap.


Detailed Description

Handle authentication of a user to the Public or ldap realm.

Author:
Dayyan (dayyanb)
Date:
7/8/2009

Constructor & Destructor Documentation

SGlobalAuthModule::__construct (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Reimplemented from SObject.


Member Function Documentation

SGlobalAuthModule::__sleep (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

SGlobalAuthModule::__wakeup (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

SGlobalAuthModule::authenticate ( username,
password 
)

Attempt to authenticate this module with a Global Authentication Database username and password.

Parameters:
$username [string]: A username to authenticate
$password [string]: A password to authenticate
Returns:
[bool]: True if authentication worked, false if not, null if error
Connect to the database, verify the user, and then set the attributes of this object from the (first) matching user record that is found.

SGlobalAuthModule::getEmail (  ) 

Gets user email address.

Returns:
[string]: Authentication database user email address

SGlobalAuthModule::getFirstName (  ) 

Gets user first name.

Returns:
[string]: Authentication database user first name

SGlobalAuthModule::getGroups (  ) 

Gets groups user is in.

Returns:
[array]: Numerically indexed array of group names

SGlobalAuthModule::getLastName (  ) 

Gets user last name.

Returns:
[string]: Authentication database user last name

SGlobalAuthModule::getLdap (  ) 

Gets ldap connection.

Returns:
[object]: SLdap object

SGlobalAuthModule::getLdapUID (  ) 

Gets ldap user id.

Does NOT return authentication database user id

Returns:
[int]: Ldap user id, or null if this is not an ldap user

SGlobalAuthModule::getPermissions (  ) 

Not Yet Implemented.

Returns:
[bool]: false

SGlobalAuthModule::getProjects (  ) 

Gets projects user is in.

Returns:
[array]: Numerically indexed array of project names

SGlobalAuthModule::getRole (  ) 

Gets role of user.

Returns:
[string]: User role, currently hardcoded as "other"

SGlobalAuthModule::getUID (  ) 

Gets authentication database user id.

Does NOT return ldap user id

Returns:
[int]: Authentication database user id

SGlobalAuthModule::getUser (  ) 

Gets authentication database user object.

Returns:
[object]: AuthUser object

SGlobalAuthModule::inProject ( project  ) 

Checks if user is in a project.

Parameters:
$project [string]: Project name
Returns:
[bool]: true if user is in project, false if user is not

SGlobalAuthModule::requireProjects ( projects,
redirect = null 
)

Requires user to be in projects.

Redirects to access denied page if user is not in all projects specified

Parameters:
$projects [array]: Array of projects to be required
$redirect [string]: Url to redirect to if user is not in projects. Defaults to $PATH['acess_denied'] or if that fails, $PATH['main'], or if that fails, "/"

SGlobalAuthModule::syncUserWithLdap (  ) 

Syncs user information with ldap.

Syncs user information with ldap information, also makes sure user is in "Shodor Internal" project if they are an ldap user and that they are not if they are not an ldap user. Called during authentication automatically.


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

Generated on Wed Nov 24 02:03:01 2010 for Common by  doxygen 1.5.6