|
CWIS Developer Documentation
|

Public Member Functions | |
| User ($UserInfoOne=NULL, $UserInfoTwo=NULL) | |
| Status () | |
| StatusMessage ($StatusCode=NULL) | |
| Delete () | |
| Id () | |
| Name () | |
| GetBestName () | |
| Get the best available name associated with a user, i.e., the real name or, if it isn't available, the user name. More... | |
| 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). More... | |
| 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(). More... | |
| static | GetSqlQueryForUsersWithPriv ($Privilege, $Privileges=NULL) |
| Get an SQL query that will return IDs of all users that have the specified privilege flags. More... | |
| static | GetSqlQueryForUsersWithoutPriv ($Privilege, $Privileges=NULL) |
| Get an SQL query that will return IDs of all users that do not have the specified privilege flags. More... | |
| static | IsValidUserName ($UserName) |
| static | IsValidPassword ($Password) |
| static | IsValidLookingEMailAddress ($EMail) |
| static | NormalizeEMailAddress ($EMailAddress) |
| static | NormalizeUserName ($UserName) |
| static | NormalizePassword ($Password) |
Protected Attributes | |
| $DB | |
| $UserId = NULL | |
| $Result | |
| $LoggedIn | |
Definition at line 43 of file Axis--User.php.
| User::ChangePassword | ( | $OldPassword, | |
| $NewPassword, | |||
| $NewPasswordAgain | |||
| ) |
Definition at line 438 of file Axis--User.php.
References $Result, IsValidPassword(), SetPassword(), U_BADPASSWORD, U_ILLEGALPASSWORD, U_NOTLOGGEDIN, U_OKAY, and U_PASSWORDSDONTMATCH.
| User::CreateNewUserAndMailPassword | ( | $UserName, | |
| $EMail, | |||
| $EMailAgain, | |||
| $EMailSubject, | |||
| $EMailBody | |||
| ) |
Definition at line 509 of file Axis--User.php.
References $Result, GetRandomPassword(), IsValidLookingEMailAddress(), Set(), U_EMAILSDONTMATCH, U_ILLEGALEMAIL, U_MAILINGERROR, and U_OKAY.
Referenced by CreateNewUserAndMailPasswordFromFile().

| User::CreateNewUserAndMailPasswordFromFile | ( | $UserName, | |
| $EMail, | |||
| $EMailAgain, | |||
$TemplateFile = "Axis--User--EMailTemplate.txt" |
|||
| ) |
Definition at line 496 of file Axis--User.php.
References CreateNewUserAndMailPassword().
Referenced by CreateNewUserWithEMailedPassword().

| User::CreateNewUserWithEMailedPassword | ( | $UserName, | |
| $EMail, | |||
| $EMailAgain, | |||
$TemplateFile = "Axis--User--EMailTemplate.txt" |
|||
| ) |
Definition at line 488 of file Axis--User.php.
References CreateNewUserAndMailPasswordFromFile().
| User::Delete | ( | ) |
Definition at line 160 of file Axis--User.php.
| User::Get | ( | $FieldName | ) |
Definition at line 247 of file Axis--User.php.
References UpdateValue().
Referenced by GetBestName(), GetMailChangeCode(), GetUniqueCode(), LastActiveDate(), LastIPAddress(), LastLocation(), Name(), and SendEMail().

| User::GetActivationCode | ( | ) |
Definition at line 580 of file Axis--User.php.
References GetUniqueCode().
Referenced by IsActivationCodeGood(), and SendEMail().

| User::GetBestName | ( | ) |
Get the best available name associated with a user, i.e., the real name or, if it isn't available, the user name.
Definition at line 203 of file Axis--User.php.
References Get().
| User::GetDate | ( | $FieldName, | |
$Format = "" |
|||
| ) |
Definition at line 256 of file Axis--User.php.
| User::GetMailChangeCode | ( | ) |
Definition at line 616 of file Axis--User.php.
References Get(), and GetUniqueCode().
Referenced by IsMailChangeCodeGood(), and SendEMail().

| User::GetPasswordSalt | ( | $UserName | ) |
Definition at line 394 of file Axis--User.php.
References $Result.
| User::GetPrivList | ( | ) |
Definition at line 916 of file Axis--User.php.
| User::GetRandomPassword | ( | $PasswordMinLength = 6, |
|
$PasswordMaxLength = 8 |
|||
| ) |
Definition at line 1008 of file Axis--User.php.
Referenced by CreateNewUserAndMailPassword().

| User::GetResetCode | ( | ) |
Definition at line 601 of file Axis--User.php.
References GetUniqueCode().
Referenced by IsResetCodeGood(), and SendEMail().

|
static |
Get an SQL query that will return IDs of all users that do not have the specified privilege flags.
This method is useful primarily for subqueries.
| mixed | $Privilege | Privilege or array of privileges. |
| mixed | $Privileges | One or more additional privileges. (variable length argument list) (OPTIONAL) |
Definition at line 831 of file Axis--User.php.
|
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.
| mixed | $Privilege | Privilege or array of privileges. |
| mixed | $Privileges | One or more additional privileges. (variable length argument list) (OPTIONAL) |
Definition at line 788 of file Axis--User.php.
| User::GetUniqueCode | ( | $SeedString, | |
| $CodeLength | |||
| ) |
Definition at line 948 of file Axis--User.php.
References Get().
Referenced by GetActivationCode(), GetMailChangeCode(), and GetResetCode().

| User::GivePriv | ( | $Privilege | ) |
Definition at line 1026 of file Axis--User.php.
References GrantPriv().
| User::GrantPriv | ( | $Privilege | ) |
Definition at line 866 of file Axis--User.php.
References $Result, U_ERROR, U_NOTLOGGEDIN, and U_OKAY.
Referenced by GivePriv(), and SetPrivList().

| User::HasPriv | ( | $Privilege, | |
$Privileges = NULL |
|||
| ) |
Check whether user has specified privilege(s).
| mixed | $Privilege | Privilege or array of privileges. |
| mixed | $Privileges | One or more additional privileges. (variable length argument list) (OPTIONAL) |
Definition at line 732 of file Axis--User.php.
| User::Id | ( | ) |
Definition at line 189 of file Axis--User.php.
References $UserId.
| User::IsActivated | ( | $NewValue = DB_NOVALUE | ) |
Definition at line 595 of file Axis--User.php.
References UpdateValue().
| User::IsActivationCodeGood | ( | $Code | ) |
Definition at line 588 of file Axis--User.php.
References GetActivationCode().
| User::IsLoggedIn | ( | ) |
Definition at line 431 of file Axis--User.php.
References $LoggedIn.
| User::IsMailChangeCodeGood | ( | $Code | ) |
Definition at line 624 of file Axis--User.php.
References GetMailChangeCode().
| User::IsNotLoggedIn | ( | ) |
Definition at line 432 of file Axis--User.php.
References $LoggedIn.
| User::IsResetCodeGood | ( | $Code | ) |
Definition at line 609 of file Axis--User.php.
References GetResetCode().
|
static |
Definition at line 984 of file Axis--User.php.
Referenced by CreateNewUserAndMailPassword(), and UserFactory\TestNewUserValues().

|
static |
Definition at line 977 of file Axis--User.php.
Referenced by ChangePassword(), and UserFactory\TestNewUserValues().

|
static |
Definition at line 971 of file Axis--User.php.
Referenced by UserFactory\FindUserNames(), and UserFactory\TestNewUserValues().

| User::LastActiveDate | ( | ) |
Definition at line 237 of file Axis--User.php.
References Get().
| User::LastIPAddress | ( | ) |
Definition at line 241 of file Axis--User.php.
References Get().
| User::LastLocation | ( | $NewLocation = NULL | ) |
Definition at line 217 of file Axis--User.php.
References Get().
| User::Login | ( | $UserName, | |
| $Password, | |||
$IgnorePassword = FALSE |
|||
| ) |
Definition at line 290 of file Axis--User.php.
References $Result, $UserId, U_BADPASSWORD, U_NOSUCHUSER, U_NOTACTIVATED, and U_OKAY.
| User::Logout | ( | ) |
Definition at line 376 of file Axis--User.php.
| User::Name | ( | ) |
Definition at line 193 of file Axis--User.php.
References Get().
|
static |
Definition at line 990 of file Axis--User.php.
Referenced by UserFactory\EMailAddressIsInUse(), and UserFactory\TestNewUserValues().

|
static |
Definition at line 1002 of file Axis--User.php.
Referenced by UserFactory\TestNewUserValues().

|
static |
Definition at line 996 of file Axis--User.php.
Referenced by UserFactory\CreateNewUser(), UserFactory\TestNewUserValues(), and UserFactory\UserNameExists().

| User::RevokePriv | ( | $Privilege | ) |
Definition at line 901 of file Axis--User.php.
References $Result, U_NOTLOGGEDIN, and U_OKAY.
| User::SendEMail | ( | $TemplateTextOrFileName, | |
$FromAddress = NULL, |
|||
$MoreSubstitutions = NULL, |
|||
$ToAddress = NULL |
|||
| ) |
Definition at line 631 of file Axis--User.php.
References $Result, Get(), GetActivationCode(), GetMailChangeCode(), GetResetCode(), Status(), U_MAILINGERROR, U_OKAY, and U_TEMPLATENOTFOUND.
| User::Set | ( | $FieldName, | |
| $NewValue | |||
| ) |
Definition at line 277 of file Axis--User.php.
References $Result, U_NOTLOGGEDIN, U_OKAY, and UpdateValue().
Referenced by CreateNewUserAndMailPassword().

|
static |
Set email function to use instead of mail().
| callback | $NewValue | Callable email function or method that accepts the same arguments as mail(). |
Definition at line 178 of file Axis--User.php.
Referenced by CWUser\__construct().

| User::SetPassword | ( | $NewPassword | ) |
Definition at line 479 of file Axis--User.php.
References UpdateValue().
Referenced by ChangePassword().

| User::SetPrivList | ( | $NewPrivileges | ) |
Definition at line 927 of file Axis--User.php.
References GrantPriv(), and U_NOTLOGGEDIN.
| User::Status | ( | ) |
Definition at line 117 of file Axis--User.php.
References $Result.
Referenced by SendEMail().

| User::StatusMessage | ( | $StatusCode = NULL | ) |
Definition at line 123 of file Axis--User.php.
References $Result, U_BADPASSWORD, U_DUPLICATEEMAIL, U_DUPLICATEUSERNAME, U_EMAILSDONTMATCH, U_ERROR, U_ILLEGALEMAIL, U_ILLEGALPASSWORD, U_ILLEGALUSERNAME, U_MAILINGERROR, U_NOSUCHUSER, U_NOTLOGGEDIN, U_OKAY, U_PASSWORDSDONTMATCH, and U_TEMPLATENOTFOUND.
| User::UpdateValue | ( | $FieldName, | |
$NewValue = DB_NOVALUE |
|||
| ) |
Definition at line 1019 of file Axis--User.php.
Referenced by Get(), IsActivated(), Set(), and SetPassword().

| User::User | ( | $UserInfoOne = NULL, |
|
$UserInfoTwo = NULL |
|||
| ) |
Definition at line 47 of file Axis--User.php.
References U_NOSUCHUSER, and U_OKAY.
Referenced by SPTUser\__construct().

|
protected |
Definition at line 961 of file Axis--User.php.
Referenced by SPTUser\GetCryptKey().
|
protected |
Definition at line 964 of file Axis--User.php.
Referenced by IsLoggedIn(), and IsNotLoggedIn().
|
protected |
Definition at line 963 of file Axis--User.php.
Referenced by ChangePassword(), CreateNewUserAndMailPassword(), Delete(), CWUser\EmailWrapper(), GetPasswordSalt(), GrantPriv(), Login(), RevokePriv(), SendEMail(), Set(), Status(), and StatusMessage().
|
protected |
Definition at line 962 of file Axis--User.php.
Referenced by CWUser\FetchAssociatedResource(), Id(), and Login().