CWIS Developer Documentation
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
User Class Reference
Inheritance diagram for User:
Inheritance graph
[legend]

Public Member Functions

 User ($UserInfoOne=NULL, $UserInfoTwo=NULL)
 
 Status ()
 
 StatusMessage ($StatusCode=NULL)
 
 Delete ()
 
 Id ()
 
 Name ()
 
 LastLocation ($NewLocation=NULL)
 
 LastActiveDate ()
 
 LastIPAddress ()
 
 Get ($FieldName)
 
 GetDate ($FieldName, $Format="")
 
 Set ($FieldName, $NewValue)
 
 Login ($UserName, $Password, $IgnorePassword=FALSE)
 
 Logout ()
 
 GetPasswordSalt ($UserName)
 
 IsLoggedIn ()
 
 IsNotLoggedIn ()
 
 ChangePassword ($OldPassword, $NewPassword, $NewPasswordAgain)
 
 SetPassword ($NewPassword)
 
 CreateNewUserWithEMailedPassword ($UserName, $EMail, $EMailAgain, $TemplateFile="Axis--User--EMailTemplate.txt")
 
 CreateNewUserAndMailPasswordFromFile ($UserName, $EMail, $EMailAgain, $TemplateFile="Axis--User--EMailTemplate.txt")
 
 CreateNewUserAndMailPassword ($UserName, $EMail, $EMailAgain, $EMailSubject, $EMailBody)
 
 GetActivationCode ()
 
 IsActivationCodeGood ($Code)
 
 IsActivated ($NewValue=DB_NOVALUE)
 
 GetResetCode ()
 
 IsResetCodeGood ($Code)
 
 GetMailChangeCode ()
 
 IsMailChangeCodeGood ($Code)
 
 SendEMail ($TemplateTextOrFileName, $FromAddress=NULL, $MoreSubstitutions=NULL, $ToAddress=NULL)
 
 HasPriv ($Privilege, $Privileges=NULL)
 Check whether user has specified privilege(s).
 
 GrantPriv ($Privilege)
 
 RevokePriv ($Privilege)
 
 GetPrivList ()
 
 SetPrivList ($NewPrivileges)
 
 GetUniqueCode ($SeedString, $CodeLength)
 
 GetRandomPassword ($PasswordMinLength=6, $PasswordMaxLength=8)
 
 UpdateValue ($FieldName, $NewValue=DB_NOVALUE)
 
 GivePriv ($Privilege)
 

Static Public Member Functions

static SetEmailFunction ($NewValue)
 Set email function to use instead of mail().
 
static GetSqlQueryForUsersWithPriv ($Privilege, $Privileges=NULL)
 Get an SQL query that will return IDs of all users that have the specified privilege flags.
 
static IsValidUserName ($UserName)
 
static IsValidPassword ($Password)
 
static IsValidLookingEMailAddress ($EMail)
 
static NormalizeEMailAddress ($EMailAddress)
 
static NormalizeUserName ($UserName)
 
static NormalizePassword ($Password)
 

Protected Attributes

 $DB
 

Detailed Description

Definition at line 42 of file Axis--User.php.

Member Function Documentation

User::ChangePassword (   $OldPassword,
  $NewPassword,
  $NewPasswordAgain 
)
User::CreateNewUserAndMailPassword (   $UserName,
  $EMail,
  $EMailAgain,
  $EMailSubject,
  $EMailBody 
)

Definition at line 465 of file Axis--User.php.

References GetRandomPassword(), IsValidLookingEMailAddress(), Set(), U_EMAILSDONTMATCH, U_ILLEGALEMAIL, U_MAILINGERROR, and U_OKAY.

Referenced by CreateNewUserAndMailPasswordFromFile().

Here is the caller graph for this function:

User::CreateNewUserAndMailPasswordFromFile (   $UserName,
  $EMail,
  $EMailAgain,
  $TemplateFile = "Axis--User--EMailTemplate.txt" 
)

Definition at line 452 of file Axis--User.php.

References CreateNewUserAndMailPassword().

Referenced by CreateNewUserWithEMailedPassword().

Here is the caller graph for this function:

User::CreateNewUserWithEMailedPassword (   $UserName,
  $EMail,
  $EMailAgain,
  $TemplateFile = "Axis--User--EMailTemplate.txt" 
)

Definition at line 444 of file Axis--User.php.

References CreateNewUserAndMailPasswordFromFile().

User::Delete ( )

Definition at line 153 of file Axis--User.php.

References U_OKAY.

User::Get (   $FieldName)

Definition at line 217 of file Axis--User.php.

References UpdateValue().

Referenced by GetMailChangeCode(), GetUniqueCode(), LastActiveDate(), LastIPAddress(), LastLocation(), Name(), and SendEMail().

Here is the caller graph for this function:

User::GetActivationCode ( )

Definition at line 536 of file Axis--User.php.

References GetUniqueCode().

Referenced by IsActivationCodeGood(), and SendEMail().

Here is the caller graph for this function:

User::GetDate (   $FieldName,
  $Format = "" 
)

Definition at line 223 of file Axis--User.php.

User::GetMailChangeCode ( )

Definition at line 572 of file Axis--User.php.

References Get(), and GetUniqueCode().

Referenced by IsMailChangeCodeGood(), and SendEMail().

Here is the caller graph for this function:

User::GetPasswordSalt (   $UserName)

Definition at line 346 of file Axis--User.php.

User::GetPrivList ( )

Definition at line 823 of file Axis--User.php.

User::GetRandomPassword (   $PasswordMinLength = 6,
  $PasswordMaxLength = 8 
)

Definition at line 906 of file Axis--User.php.

Referenced by CreateNewUserAndMailPassword().

Here is the caller graph for this function:

User::GetResetCode ( )

Definition at line 557 of file Axis--User.php.

References GetUniqueCode().

Referenced by IsResetCodeGood(), and SendEMail().

Here is the caller graph for this function:

static User::GetSqlQueryForUsersWithPriv (   $Privilege,
  $Privileges = NULL 
)
static

Get an SQL query that will return IDs of all users that have the specified privilege flags.

This method is useful primarily for subqueries.

Parameters
PrivilegePrivilege or array of privileges.
PrivilegesOne or more additional privileges. (variable length argument list) (OPTIONAL)
Returns
SQL query to retrieve user IDs.

Definition at line 744 of file Axis--User.php.

User::GetUniqueCode (   $SeedString,
  $CodeLength 
)

Definition at line 849 of file Axis--User.php.

References Get().

Referenced by GetActivationCode(), GetMailChangeCode(), and GetResetCode().

Here is the caller graph for this function:

User::GivePriv (   $Privilege)

Definition at line 924 of file Axis--User.php.

References GrantPriv().

User::GrantPriv (   $Privilege)

Definition at line 779 of file Axis--User.php.

References U_ERROR, and U_OKAY.

Referenced by GivePriv(), and SetPrivList().

Here is the caller graph for this function:

User::HasPriv (   $Privilege,
  $Privileges = NULL 
)

Check whether user has specified privilege(s).

Parameters
PrivilegePrivilege or array of privileges.
PrivilegesOne or more additional privileges. (variable length argument list) (OPTIONAL)
Returns
TRUE if user has one or more of specified privilege(s), otherwise FALSE.

Definition at line 688 of file Axis--User.php.

References IsLoggedIn().

Referenced by Resource\UserCanView().

Here is the caller graph for this function:

User::Id ( )

Definition at line 182 of file Axis--User.php.

Referenced by SPTUser\SPTUser(), and SPTUser\UUPUpdateValue().

Here is the caller graph for this function:

User::IsActivated (   $NewValue = DB_NOVALUE)

Definition at line 551 of file Axis--User.php.

References UpdateValue().

User::IsActivationCodeGood (   $Code)

Definition at line 544 of file Axis--User.php.

References GetActivationCode().

User::IsLoggedIn ( )

Definition at line 383 of file Axis--User.php.

Referenced by ChangePassword(), HasPriv(), and SPTUser\SPTUser().

Here is the caller graph for this function:

User::IsMailChangeCodeGood (   $Code)

Definition at line 580 of file Axis--User.php.

References GetMailChangeCode().

User::IsNotLoggedIn ( )

Definition at line 384 of file Axis--User.php.

User::IsResetCodeGood (   $Code)

Definition at line 565 of file Axis--User.php.

References GetResetCode().

static User::IsValidLookingEMailAddress (   $EMail)
static

Definition at line 882 of file Axis--User.php.

Referenced by CreateNewUserAndMailPassword(), and UserFactory\TestNewUserValues().

Here is the caller graph for this function:

static User::IsValidPassword (   $Password)
static

Definition at line 875 of file Axis--User.php.

Referenced by ChangePassword(), and UserFactory\TestNewUserValues().

Here is the caller graph for this function:

static User::IsValidUserName (   $UserName)
static

Definition at line 869 of file Axis--User.php.

Referenced by UserFactory\FindUserNames(), and UserFactory\TestNewUserValues().

Here is the caller graph for this function:

User::LastActiveDate ( )

Definition at line 207 of file Axis--User.php.

References Get().

User::LastIPAddress ( )

Definition at line 211 of file Axis--User.php.

References Get().

User::LastLocation (   $NewLocation = NULL)

Definition at line 190 of file Axis--User.php.

References Get().

User::Login (   $UserName,
  $Password,
  $IgnorePassword = FALSE 
)

Definition at line 251 of file Axis--User.php.

References U_BADPASSWORD, U_NOSUCHUSER, and U_OKAY.

User::Logout ( )

Definition at line 328 of file Axis--User.php.

User::Name ( )

Definition at line 186 of file Axis--User.php.

References Get().

Referenced by Resource\UserCanView().

Here is the caller graph for this function:

static User::NormalizeEMailAddress (   $EMailAddress)
static

Definition at line 888 of file Axis--User.php.

Referenced by UserFactory\EMailAddressIsInUse(), and UserFactory\TestNewUserValues().

Here is the caller graph for this function:

static User::NormalizePassword (   $Password)
static

Definition at line 900 of file Axis--User.php.

Referenced by UserFactory\TestNewUserValues().

Here is the caller graph for this function:

static User::NormalizeUserName (   $UserName)
static

Definition at line 894 of file Axis--User.php.

Referenced by UserFactory\CreateNewUser(), UserFactory\TestNewUserValues(), and UserFactory\UserNameExists().

Here is the caller graph for this function:

User::RevokePriv (   $Privilege)

Definition at line 811 of file Axis--User.php.

References U_OKAY.

User::SendEMail (   $TemplateTextOrFileName,
  $FromAddress = NULL,
  $MoreSubstitutions = NULL,
  $ToAddress = NULL 
)
User::Set (   $FieldName,
  $NewValue 
)

Definition at line 241 of file Axis--User.php.

References U_OKAY, and UpdateValue().

Referenced by CreateNewUserAndMailPassword().

Here is the caller graph for this function:

static User::SetEmailFunction (   $NewValue)
static

Set email function to use instead of mail().

Parameters
NewValueCallable email function or method that accepts the same arguments as mail().

Definition at line 171 of file Axis--User.php.

User::SetPassword (   $NewPassword)

Definition at line 435 of file Axis--User.php.

References UpdateValue().

Referenced by ChangePassword().

Here is the caller graph for this function:

User::SetPrivList (   $NewPrivileges)

Definition at line 831 of file Axis--User.php.

References GrantPriv().

User::Status ( )

Definition at line 110 of file Axis--User.php.

Referenced by SendEMail().

Here is the caller graph for this function:

User::StatusMessage (   $StatusCode = NULL)
User::UpdateValue (   $FieldName,
  $NewValue = DB_NOVALUE 
)

Definition at line 917 of file Axis--User.php.

Referenced by Get(), IsActivated(), Set(), and SetPassword().

Here is the caller graph for this function:

User::User (   $UserInfoOne = NULL,
  $UserInfoTwo = NULL 
)

Definition at line 46 of file Axis--User.php.

References U_NOSUCHUSER, and U_OKAY.

Referenced by SPTUser\SPTUser().

Here is the caller graph for this function:

Member Data Documentation

User::$DB
protected

Definition at line 859 of file Axis--User.php.

Referenced by SPTUser\GetCryptKey().


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