phpClick
[ class tree: phpClick ] [ index: phpClick ] [ all elements ]

Class: User

Source Location: /includes/User.inc.php

Class Overview


Represents a user of phpClick. Handles login, etc.


Methods



Class Details

[line 5]
Represents a user of phpClick. Handles login, etc.



[ Top ]


Class Methods


constructor __construct [line 14]

User __construct( [string $sUserId = NULL], [string $sPassword = NULL])

Instantiates a new User object that represents a user of phpClick

If passed a valid user-id/password combination the user is logged on (Id stored in session)




Parameters:

string   $sUserId   The user's Id
string   $sPassword   The user's password

[ Top ]

method createNewUser [line 224]

void createNewUser( string $sUserId, string $sPasswordCrypt, string $sFirstName, string $sLastName, string $sEmail)

Creates a new user within the database



Tags:

static:  
access:  public


Parameters:

string   $sUserId   The user-id
string   $sPasswordCrypt   The password in encrypted form
string   $sFirstName   The first name
string   $sLastName   The last name
string   $sEmail   The e-mail

[ Top ]

method getApplications [line 173]

array getApplications( )

Returns an array of all applications that the user is an administrator for [$i]['id'] contains the application's id [$i]['name'] contains the application's name



Tags:

return:  array of applications.
access:  public


[ Top ]

method getLastVoteForAFeatureDate [line 306]

string getLastVoteForAFeatureDate( )

Returns the date that the user last voted for the "Feature of the week"



Tags:

return:  The date, e.g. "2004-12-17"
access:  public


[ Top ]

method getUserId [line 157]

void getUserId( )



[ Top ]

method hasAppWithName [line 199]

void hasAppWithName( string $sName)

Returns TRUE if an application with this name already exists for this user



Tags:

access:  public


Parameters:

string   $sName   Application name

[ Top ]

method isAuthenticated [line 153]

void isAuthenticated( )



[ Top ]

method isEligibleToVoteForAFeature [line 323]

boolean isEligibleToVoteForAFeature( )

Determines whether or not this user is allowed to cast a vote for the next "Feature of the week". This depends on when the user voted the last time



Tags:

return:  TRUE if eligible, FALSE otherwise
access:  public


[ Top ]

method isExistingUserId [line 77]

boolean isExistingUserId( string $sUserId)

Returns TRUE if the user Id is a registered (or in-registration-process) user



Tags:

return:  TRUE if user Id exists, FALSE otherwise
static:  
access:  public


Parameters:

string   $sUserId   User Id to be checked

[ Top ]

method isValidFirstNameFormat [line 121]

boolean isValidFirstNameFormat( string $sFirstName)

Returns TRUE if the first name passed as a parameter has a valid format



Tags:

return:  TRUE if format is OK, FALSE otherwise
static:  
access:  public


Parameters:

string   $sFirstName   First name to be checked

[ Top ]

method isValidLastNameFormat [line 131]

boolean isValidLastNameFormat( string $sLastName)

Returns TRUE if the last name passed as a parameter has a valid format



Tags:

return:  TRUE if format is OK, FALSE otherwise
static:  
access:  public


Parameters:

string   $sLastName   Last name to be checked

[ Top ]

method isValidLogin [line 30]

boolean isValidLogin( [string $sUserId = NULL], [string $sPassword = NULL])

Verifies a user-ID and password against the user database in MySQL and/or LDAP



Tags:

return:  TRUE if the user could be authenticated, FALSE otherwise
static:  
access:  public


Parameters:

string   $sUserId   The user's Id
string   $sPassword   The user's password

[ Top ]

method isValidPasswordFormat [line 141]

boolean isValidPasswordFormat( string $sPassword)

Returns TRUE if the password passed as a parameter has a valid format



Tags:

return:  TRUE if format is OK, FALSE otherwise
static:  
access:  public


Parameters:

string   $sPassword   Password to be checked

[ Top ]

method isValidUserIdFormat [line 67]

boolean isValidUserIdFormat( string $sUserId)

Returns TRUE if the user Id passed as a parameter has a valid user-Id format



Tags:

return:  TRUE if format is OK, FALSE otherwise
static:  
access:  public


Parameters:

string   $sUserId   User Id to be checked

[ Top ]

method isValidUserPasswordFormat [line 111]

boolean isValidUserPasswordFormat( string $sPassword)

Returns TRUE if the password passed as a parameter has a valid format



Tags:

return:  TRUE if format is OK, FALSE otherwise
static:  
access:  public


Parameters:

string   $sPassword   Password to be checked

[ Top ]

method setLastVoteForAFeatureDate [line 295]

void setLastVoteForAFeatureDate( )

Sets the date that the user last voted for the "Feature of the week" to the current date, e.g. "2004-12-17"



Tags:

access:  public


[ Top ]


Documentation generated on Wed, 12 Jan 2005 17:53:13 -0500 by phpDocumentor 1.3.0RC3