User management for the world wide web

Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

GenieGate_Api_User Class Reference

This is a class representing the user who has logged in. More...

List of all members.

Public Member Functions

 GenieGate_Api_User ($l, $info)
 This is not meant to be constructed from outside the GenieGate_Api_Login class.

 getProperties ($section="genie.form.Public")
 Get users properties.

 checkPassword ($password)
 Checks the users password against the supplied one.

 checkSessionKey ($key)
 Check to see if the session key matches.

 isActivated ()
 Check to see if the account has been confirmed.

 getName ()
 Get the users name.

 getUserId ()
 Get the user ID.

 getEmail ()
 Get the email address.

 getGroups ()
 Get an array of all groups this user is a member of.

 checkGroups (&$groups)
 Make sure the user (uid) is a member of all the listed groups.


Detailed Description

This is a class representing the user who has logged in.

It provides basic, read-only access to user data.

See also:
GenieGate_Api_Login

Definition at line 11 of file Login.php.


Constructor & Destructor Documentation

GenieGate_Api_User l,
info
 

This is not meant to be constructed from outside the GenieGate_Api_Login class.

(It is "protected")

See also:
GenieGate_Api_Login::login()

GenieGate_Api_Login::lookupUser()

GenieGate_Api_Login::passiveLogin()

Definition at line 27 of file Login.php.


Member Function Documentation

checkGroups &$  groups  ) 
 

Make sure the user (uid) is a member of all the listed groups.

Parameters:
$groups - Array of Group ID's.
Returns:
- True if user is a member of all the groups.

Definition at line 143 of file Login.php.

checkPassword password  ) 
 

Checks the users password against the supplied one.

This handles the crypt() 1-way cipher.

Parameters:
$password - The plain-text password in question.
Returns:
TRUE if the passwords match.

Definition at line 79 of file Login.php.

checkSessionKey key  ) 
 

Check to see if the session key matches.

Session keys are crypted before they are held in the session to prevent someone who has access to the session data from hi-jacking it.

Parameters:
$key - The session key.
Returns:
TRUE or FALSE.

Definition at line 90 of file Login.php.

getEmail  ) 
 

Get the email address.

Returns:
String containing their email address.

Definition at line 122 of file Login.php.

getGroups  ) 
 

Get an array of all groups this user is a member of.

Returns:
an array each element is a group ID.

Definition at line 128 of file Login.php.

getName  ) 
 

Get the users name.

This is the users common name.

Returns:
a string witht heir name.

Definition at line 108 of file Login.php.

getProperties section = "genie.form.Public"  ) 
 

Get users properties.

Fetches an associative array of the users properties, the array consists of propertyName => propertyValue.

The optional $section parameter is used to specify which section to use, and defaults to "genie.form.Public".

By default, the only sections are genie.form.Public and genie.form.Private (Properties visible to user, and properties hidden from user) but the other modules for creating properties have support for multiple sections to facilitate customization.

Parameters:
$section - The section key.
Returns:
an associative array.

Definition at line 48 of file Login.php.

getUserId  ) 
 

Get the user ID.

Returns:
string contianing the user ID.

Definition at line 115 of file Login.php.

isActivated  ) 
 

Check to see if the account has been confirmed.

If the user signed up, but did not click the link sent in email, this method will return FALSE.

Definition at line 98 of file Login.php.


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