CWIS Developer Documentation
|
Class supplying standard methods that process changes to user entered via HTML forms. More...
Public Member Functions | |
__construct ($CWUser) | |
Set up a new UserEditingUI. More... | |
UpdateUserAttributes (array $FormValues, $IsNewUser=FALSE, $UpdateUserEmail=FALSE) | |
Save user attributes that aren't stored in User Schema fields. More... | |
UpdateUserFields (array $Fields) | |
Save updated values for fields from the User schema based on data supplised in HTML forms. More... | |
UploadFiles ($FormValues, $Files) | |
Process file upload requests. More... | |
UploadImages ($FormValues, $Files) | |
Process image upload requests for a user. More... | |
Static Public Member Functions | |
static | UserFormHasErrors (&$FTool, $UserErrorCodes, $ErrorMessages=NULL) |
Determine if a user editing form has errors, setting error codes in the correspnding FormTool. More... | |
static | GetActivationEmailSubstitutions ($NewUser) |
Retrieve the array of substitutions for new user activation mails. More... | |
static | GetRequestAccountForm ($ReadOnlyFields=array(), $FieldsToExclude=array(), $AdditionalFields=array()) |
Retrieve the array of Request Account Form information. More... | |
static | GetAdditionalErrorCodes ($UserName) |
Get the list of account creation-related error messages. More... | |
static | TestUserValues ($FormValues) |
Check potential form values for a user including event signals. More... | |
Class supplying standard methods that process changes to user entered via HTML forms.
Definition at line 14 of file UserEditingUI.php.
UserEditingUI::__construct | ( | $CWUser | ) |
Set up a new UserEditingUI.
Definition at line 20 of file UserEditingUI.php.
|
static |
Retrieve the array of substitutions for new user activation mails.
Definition at line 786 of file UserEditingUI.php.
|
static |
Get the list of account creation-related error messages.
string | $UserName | UserName for the password reminder link. |
Definition at line 964 of file UserEditingUI.php.
References U_DUPLICATEEMAIL.
|
static |
Retrieve the array of Request Account Form information.
array | $ReadOnlyFields | Fields to be displayed as read-only. (OPTIONAL) |
array | $FieldsToExclude | Fields to be removed from default list. (OPTIONAL) |
array | $AdditionalFields | Additional fields to be displayed. (OPTIONAL) |
Definition at line 814 of file UserEditingUI.php.
References FormUI_Base\FTYPE_HEADING, FormUI_Base\FTYPE_OPTION, FormUI_Base\FTYPE_PASSWORD, FormUI_Base\FTYPE_TEXT, User\GetPasswordRulesDescription(), and StdLib\GetUsStatesList().
|
static |
Check potential form values for a user including event signals.
array | $FormValues | Values as from $_POST. |
Definition at line 981 of file UserEditingUI.php.
References U_OKAY.
UserEditingUI::UpdateUserAttributes | ( | array | $FormValues, |
$IsNewUser = FALSE , |
|||
$UpdateUserEmail = FALSE |
|||
) |
Save user attributes that aren't stored in User Schema fields.
array | $FormValues | From _POST to process. |
bool | $IsNewUser | New User? (OPTIONAL, default FALSE). |
bool | $UpdateUserEmail | Indicate whether user email should be updated (OPTIONAL, default FALSE) |
Definition at line 32 of file UserEditingUI.php.
References User\Get(), User\Id(), and User\Set().
UserEditingUI::UpdateUserFields | ( | array | $Fields | ) |
Save updated values for fields from the User schema based on data supplised in HTML forms.
array | $Fields | The fields to save update. |
Definition at line 95 of file UserEditingUI.php.
References MetadataSchema\MDFTYPE_CONTROLLEDNAME, MetadataSchema\MDFTYPE_DATE, MetadataSchema\MDFTYPE_FILE, MetadataSchema\MDFTYPE_FLAG, MetadataSchema\MDFTYPE_IMAGE, MetadataSchema\MDFTYPE_NUMBER, MetadataSchema\MDFTYPE_OPTION, MetadataSchema\MDFTYPE_PARAGRAPH, MetadataSchema\MDFTYPE_POINT, MetadataSchema\MDFTYPE_REFERENCE, MetadataSchema\MDFTYPE_TEXT, MetadataSchema\MDFTYPE_TIMESTAMP, MetadataSchema\MDFTYPE_TREE, MetadataSchema\MDFTYPE_URL, MetadataSchema\MDFTYPE_USER, MetadataSchema\SCHEMAID_USER, and MetadataField\UPDATEMETHOD_ONRECORDCHANGE.
UserEditingUI::UploadFiles | ( | $FormValues, | |
$Files | |||
) |
Process file upload requests.
array | $FormValues | Values as from $_POST. |
array | $Files | Files as from $_FILES. |
Definition at line 509 of file UserEditingUI.php.
References File\FILESTAT_OK, File\FILESTAT_ZEROLENGTH, MetadataSchema\MDFTYPE_FILE, and MetadataSchema\SCHEMAID_USER.
UserEditingUI::UploadImages | ( | $FormValues, | |
$Files | |||
) |
Process image upload requests for a user.
array | $FormValues | Values as from $_POST. |
array | $Files | Files as from $_FILES. |
Definition at line 590 of file UserEditingUI.php.
References AI_OKAY, AI_UNKNOWNTYPE, AI_UNSUPPORTEDFORMAT, MetadataSchema\MDFTYPE_IMAGE, and MetadataSchema\SCHEMAID_USER.
|
static |
Determine if a user editing form has errors, setting error codes in the correspnding FormTool.
FormTool | $FTool | FTool associated with the user edting page. |
array | $UserErrorCodes | Error codes encountered for this edit. |
array | $ErrorMessages | Error messages corresponding to each error code ( array($ErrorCode => $ErrorMessage) ). |
Definition at line 666 of file UserEditingUI.php.
References User\GetStatusMessageForCode(), U_DUPLICATEEMAIL, U_DUPLICATEUSERNAME, U_EMAILSDONTMATCH, U_EMPTYEMAIL, U_EMPTYEMAILAGAIN, U_EMPTYPASSWORD, U_EMPTYPASSWORDAGAIN, U_EMPTYUSERNAME, U_ILLEGALEMAIL, U_ILLEGALEMAILAGAIN, U_ILLEGALPASSWORD, U_ILLEGALPASSWORDAGAIN, U_ILLEGALUSERNAME, and U_PASSWORDSDONTMATCH.