SLdap Class Reference
[Undocumented Classes]

INSERT BRIEF DESCRIPTION HERE. More...

Inheritance diagram for SLdap:

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 SLdap.php5.


Constructor & Destructor Documentation

SLdap::__construct (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Reimplemented from SObject.

Definition at line 254 of file SLdap.php5.

References SConfig::getDefault().


Member Function Documentation

SLdap::__sleep (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 695 of file SLdap.php5.

References disconnect().

SLdap::__wakeup (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 707 of file SLdap.php5.

References checkConnect().

SLdap::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 271 of file SLdap.php5.

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

SLdap::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 503 of file SLdap.php5.

References connect().

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

SLdap::clearAllCaches (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 65 of file SLdap.php5.

References clearGroupCache(), and clearUserCache().

SLdap::clearGroupCache (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 54 of file SLdap.php5.

Referenced by clearAllCaches().

SLdap::clearUserCache (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 43 of file SLdap.php5.

Referenced by clearAllCaches().

SLdap::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 463 of file SLdap.php5.

Referenced by authenticate(), and checkConnect().

SLdap::disconnect (  ) 

Close the LDAP connection.

For internal use only.

Definition at line 491 of file SLdap.php5.

Referenced by __sleep().

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

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

For internal use only.

Definition at line 516 of file SLdap.php5.

References checkConnect(), and lookupUsers().

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

SLdap::getEmail ( uid = ''  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

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

Definition at line 366 of file SLdap.php5.

References fillLoggedInUserInfo(), and getEmail().

Referenced by getEmail().

SLdap::getFirstName ( uid = ''  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

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

Definition at line 334 of file SLdap.php5.

References fillLoggedInUserInfo(), and getFirstName().

Referenced by getFirstName().

SLdap::getGroupFromGid ( gid  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

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

Definition at line 202 of file SLdap.php5.

References lookupGroups().

SLdap::getGroupInfo ( gid  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

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

Definition at line 157 of file SLdap.php5.

References lookupGroups().

SLdap::getHomePhone ( uid = ''  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

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

Definition at line 423 of file SLdap.php5.

References fillLoggedInUserInfo().

SLdap::getLastName ( uid = ''  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

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

Definition at line 350 of file SLdap.php5.

References fillLoggedInUserInfo(), and getLastName().

Referenced by getLastName().

SLdap::getMobile ( uid = ''  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

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

Definition at line 404 of file SLdap.php5.

References fillLoggedInUserInfo().

SLdap::getPassword (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 300 of file SLdap.php5.

SLdap::getPermissions (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Reimplemented from SAuthModule.

Definition at line 449 of file SLdap.php5.

SLdap::getPhone ( uid = ''  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

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

Definition at line 385 of file SLdap.php5.

References fillLoggedInUserInfo().

SLdap::getRole (  ) 

Get a user's role.

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

Reimplemented from SAuthModule.

Definition at line 438 of file SLdap.php5.

SLdap::getUID (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Reimplemented from SAuthModule.

Definition at line 322 of file SLdap.php5.

SLdap::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 131 of file SLdap.php5.

References lookupUsers().

SLdap::getUidFromUserName ( username  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

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

Definition at line 112 of file SLdap.php5.

References lookupUsers().

SLdap::getUserFromUid ( uid  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

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

Definition at line 185 of file SLdap.php5.

References lookupUsers().

SLdap::getUserInfo ( uid  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

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

Definition at line 78 of file SLdap.php5.

References lookupUsers().

SLdap::getUserName (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 311 of file SLdap.php5.

SLdap::listGroups ( uid = ""  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

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

Definition at line 219 of file SLdap.php5.

References lookupGroups(), and lookupUsers().

SLdap::listUsers (  ) 

INSERT BRIEF DESCRIPTION HERE.

INSERT FULL DESCRIPTION HERE

Returns:
[TYPE]: RETURN DESCRIPTION

Definition at line 242 of file SLdap.php5.

References lookupUsers().

SLdap::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 648 of file SLdap.php5.

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

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

SLdap::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 539 of file SLdap.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