SLdapAuthModule Class Reference
[Undocumented Classes]

INSERT BRIEF DESCRIPTION HERE. More...

Inheritance diagram for SLdapAuthModule:

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 Shodor LDAP username and password.
 clearAllCaches ()
 INSERT BRIEF DESCRIPTION HERE.
 clearGroupCache ()
 INSERT BRIEF DESCRIPTION HERE.
 clearUserCache ()
 INSERT BRIEF DESCRIPTION HERE.
 disconnect ()
 Close the LDAP connection.
 getEmail ($uid= '')
 INSERT BRIEF DESCRIPTION HERE.
 getFirstName ($uid= '')
 INSERT BRIEF DESCRIPTION HERE.
 getGroupFromGid ($gid)
 INSERT BRIEF DESCRIPTION HERE.
 getGroupInfo ($gid)
 INSERT BRIEF DESCRIPTION HERE.
 getHomePhone ($uid= '')
 INSERT BRIEF DESCRIPTION HERE.
 getLastName ($uid= '')
 INSERT BRIEF DESCRIPTION HERE.
 getMobile ($uid= '')
 INSERT BRIEF DESCRIPTION HERE.
 getPassword ()
 INSERT BRIEF DESCRIPTION HERE.
 getPermissions ()
 INSERT BRIEF DESCRIPTION HERE.
 getPhone ($uid= '')
 INSERT BRIEF DESCRIPTION HERE.
 getRole ()
 Get a user's role.
 getUID ()
 INSERT BRIEF DESCRIPTION HERE.
 getUidFromRealName ($firstName="", $lastName="")
 INSERT BRIEF DESCRIPTION HERE.
 getUidFromUserName ($username)
 INSERT BRIEF DESCRIPTION HERE.
 getUserFromUid ($uid)
 INSERT BRIEF DESCRIPTION HERE.
 getUserInfo ($uid)
 INSERT BRIEF DESCRIPTION HERE.
 getUserName ()
 INSERT BRIEF DESCRIPTION HERE.
 listGroups ($uid="")
 INSERT BRIEF DESCRIPTION HERE.
 listUsers ()
 INSERT BRIEF DESCRIPTION HERE.

Private Member Functions

 checkConnect ()
 Check the LDAP connection.
 connect ($server, $port, $dn, $user="anonymous", $pass="anonymous")
 Connect to an LDAP server using ldap_bind.
 fillLoggedInUserInfo ($uid= '')
 Set this object's UID and Groups variables from the logged in user.
 lookupGroups ($gid="")
 INSERT BRIEF DESCRIPTION HERE.
 lookupUsers ($username="")
 INSERT BRIEF DESCRIPTION HERE.


Detailed Description

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Author:
AUTHOR (DATE)

Definition at line 13 of file SLdapAuthModule.php5.


Constructor & Destructor Documentation

SLdapAuthModule::__construct (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Reimplemented from SObject.

Definition at line 255 of file SLdapAuthModule.php5.

References SConfig::getDefault().


Member Function Documentation

SLdapAuthModule::__sleep (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 700 of file SLdapAuthModule.php5.

References disconnect().

SLdapAuthModule::__wakeup (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 712 of file SLdapAuthModule.php5.

References checkConnect().

SLdapAuthModule::authenticate ( username,
password 
)

Attempt to authenticate this module with a Shodor LDAP username and password.

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

Reimplemented from SAuthModule.

Definition at line 272 of file SLdapAuthModule.php5.

References connect(), fillLoggedInUserInfo(), and lookupGroups().

SLdapAuthModule::checkConnect (  )  [private]

Check the LDAP connection.

For internal use only.

Returns:
[bool]: False if it is no longer connected, true if it is

Definition at line 506 of file SLdapAuthModule.php5.

References connect().

Referenced by __wakeup(), fillLoggedInUserInfo(), lookupGroups(), and lookupUsers().

SLdapAuthModule::clearAllCaches (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 65 of file SLdapAuthModule.php5.

References clearGroupCache(), and clearUserCache().

SLdapAuthModule::clearGroupCache (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 54 of file SLdapAuthModule.php5.

Referenced by clearAllCaches().

SLdapAuthModule::clearUserCache (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 43 of file SLdapAuthModule.php5.

Referenced by clearAllCaches().

SLdapAuthModule::connect ( server,
port,
dn,
user = "anonymous",
pass = "anonymous" 
) [private]

Connect to an LDAP server using ldap_bind.

For internal use only.

Parameters:
$server [string]: The name of the server
$port [int]: which port to use when connecting to LDAP
$dn [string]: The domain to search
$user [string]: An LDAP username (anonymous by default)
$pass [string]: An LDAP password (anonymous by default)
Returns:
[bool]: True if binding worked, false if failed

Definition at line 465 of file SLdapAuthModule.php5.

Referenced by authenticate(), and checkConnect().

SLdapAuthModule::disconnect (  ) 

Close the LDAP connection.

For internal use only.

Definition at line 494 of file SLdapAuthModule.php5.

Referenced by __sleep().

SLdapAuthModule::fillLoggedInUserInfo ( uid = ''  )  [private]

Set this object's UID and Groups variables from the logged in user.

For internal use only.

Definition at line 519 of file SLdapAuthModule.php5.

References checkConnect(), and lookupUsers().

Referenced by authenticate(), getEmail(), getFirstName(), getHomePhone(), getLastName(), getMobile(), and getPhone().

SLdapAuthModule::getEmail ( uid = ''  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Parameters:
$uid [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 368 of file SLdapAuthModule.php5.

References fillLoggedInUserInfo(), and getEmail().

Referenced by getEmail().

SLdapAuthModule::getFirstName ( uid = ''  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Parameters:
$uid [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 336 of file SLdapAuthModule.php5.

References fillLoggedInUserInfo(), and getFirstName().

Referenced by getFirstName().

SLdapAuthModule::getGroupFromGid ( gid  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Parameters:
$gid [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 203 of file SLdapAuthModule.php5.

References lookupGroups().

SLdapAuthModule::getGroupInfo ( gid  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Parameters:
$gid [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 158 of file SLdapAuthModule.php5.

References lookupGroups().

SLdapAuthModule::getHomePhone ( uid = ''  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Parameters:
$uid [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 425 of file SLdapAuthModule.php5.

References fillLoggedInUserInfo().

SLdapAuthModule::getLastName ( uid = ''  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Parameters:
$uid [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 352 of file SLdapAuthModule.php5.

References fillLoggedInUserInfo(), and getLastName().

Referenced by getLastName().

SLdapAuthModule::getMobile ( uid = ''  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Parameters:
$uid [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 406 of file SLdapAuthModule.php5.

References fillLoggedInUserInfo().

SLdapAuthModule::getPassword (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 302 of file SLdapAuthModule.php5.

SLdapAuthModule::getPermissions (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Reimplemented from SAuthModule.

Definition at line 451 of file SLdapAuthModule.php5.

SLdapAuthModule::getPhone ( uid = ''  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Parameters:
$uid [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 387 of file SLdapAuthModule.php5.

References fillLoggedInUserInfo().

SLdapAuthModule::getRole (  ) 

Get a user's role.

Returns:
[string]: The role of this user (staff, intern, or apprentice)

Reimplemented from SAuthModule.

Definition at line 440 of file SLdapAuthModule.php5.

SLdapAuthModule::getUID (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Reimplemented from SAuthModule.

Definition at line 324 of file SLdapAuthModule.php5.

SLdapAuthModule::getUidFromRealName ( firstName = "",
lastName = "" 
)

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Parameters:
$firstName [TYPE]: DESCRIPTION
$lastName [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 132 of file SLdapAuthModule.php5.

References lookupUsers().

SLdapAuthModule::getUidFromUserName ( username  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Parameters:
$username [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 112 of file SLdapAuthModule.php5.

References lookupUsers().

SLdapAuthModule::getUserFromUid ( uid  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Parameters:
$uid [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 186 of file SLdapAuthModule.php5.

References lookupUsers().

SLdapAuthModule::getUserInfo ( uid  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Parameters:
$uid [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 78 of file SLdapAuthModule.php5.

References lookupUsers().

SLdapAuthModule::getUserName (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 313 of file SLdapAuthModule.php5.

SLdapAuthModule::listGroups ( uid = ""  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Parameters:
$uid [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 220 of file SLdapAuthModule.php5.

References lookupGroups(), and lookupUsers().

SLdapAuthModule::listUsers (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 243 of file SLdapAuthModule.php5.

References lookupUsers().

SLdapAuthModule::lookupGroups ( gid = ""  )  [private]

INSERT BRIEF DESCRIPTION HERE.

For internal use only.

INSERT FULL DESCRIPTION HERE

Parameters:
$gid [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 653 of file SLdapAuthModule.php5.

References checkConnect(), and SObject::setError().

Referenced by authenticate(), getGroupFromGid(), getGroupInfo(), and listGroups().

SLdapAuthModule::lookupUsers ( username = ""  )  [private]

INSERT BRIEF DESCRIPTION HERE.

For internal use only.

INSERT FULL DESCRIPTION HERE

Parameters:
$username [TYPE]: DESCRIPTION
Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 542 of file SLdapAuthModule.php5.

References checkConnect(), and SObject::setError().

Referenced by fillLoggedInUserInfo(), getUidFromRealName(), getUidFromUserName(), getUserFromUid(), getUserInfo(), listGroups(), and listUsers().


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

Generated on Wed Nov 24 02:06:16 2010 for Common by  doxygen 1.5.6