core/model/modx/processors/security/user/updatefromgrid.class.php

Show: inherited
Table of Contents

Update a user from a grid

Package
modx  
$id
integer

The ID of the user

Subpackage
processors.security.user  

\modUserUpdateFromGridProcessor

Package: modx\processors\security\user

Update a user from a grid

{@inheritdoc}

Parent(s)
\modUserUpdateProcessor < \modObjectUpdateProcessor < \modObjectProcessor < \modProcessor
$id
integer

The ID of the user

Properties

Propertypublicboolean  $activeStatusChanged= 'false'
Default valuefalseDetails
Type
boolean
Inherited_from
\modUserUpdateProcessor::$$activeStatusChanged  
Propertypublicstring  $afterSaveEvent= ''OnUserFormSave''
inherited

The name of the event to fire after savingInherited from: \modUserUpdateProcessor::$$afterSaveEvent
Default value'OnUserFormSave'Details
Type
string
Inherited_from
\modUserUpdateProcessor::$$afterSaveEvent  
Propertypublicstring  $beforeSaveEvent= ''OnBeforeUserFormSave''
inherited

The name of the event to fire before savingInherited from: \modUserUpdateProcessor::$$beforeSaveEvent
Default value'OnBeforeUserFormSave'Details
Type
string
Inherited_from
\modUserUpdateProcessor::$$beforeSaveEvent  
Propertypublic  $checkSavePermission= 'true'
Default valuetrueDetails
Type
n/a
Inherited_from
\modObjectUpdateProcessor::$$checkSavePermission  
Inherited_from
\modUserUpdateProcessor::$$checkSavePermission  
Propertypublicstring  $classKey= ''modUser''
inherited

The class key of the Object to iterateInherited from: \modUserUpdateProcessor::$$classKey
Default value'modUser'Details
Type
string
Inherited_from
\modUserUpdateProcessor::$$classKey  
Propertypublicarray  $languageTopics= 'array('user')'
inherited

An array of language topics to loadInherited from: \modUserUpdateProcessor::$$languageTopics
Default valuearray('user')Details
Type
array
Inherited_from
\modUserUpdateProcessor::$$languageTopics  
Propertypublic\modX  $modx= 'null'
Default valuenullDetails
Type
\modX
Inherited_from
\modProcessor::$$modx  
Inherited_from
\modObjectProcessor::$$modx  
Inherited_from
\modObjectUpdateProcessor::$$modx  
Inherited_from
\modUserUpdateProcessor::$$modx  
Propertypublicboolean  $newActiveStatus= 'false'
Default valuefalseDetails
Type
boolean
Inherited_from
\modUserUpdateProcessor::$$newActiveStatus  
Propertypublicstring  $newPassword= ''''
inherited

Inherited from: \modUserUpdateProcessor::$$newPassword
Default value''Details
Type
string
Inherited_from
\modUserUpdateProcessor::$$newPassword  
Propertypublic\modUser  $object= ''
inherited

Inherited from: \modUserUpdateProcessor::$$object
Details
Type
\modUser
Inherited_from
\modUserUpdateProcessor::$$object  
Propertypublicstring  $objectType= ''user''
inherited

The object "type", this will be used in various lexicon error stringsInherited from: \modUserUpdateProcessor::$$objectType
Default value'user'Details
Type
string
Inherited_from
\modUserUpdateProcessor::$$objectType  
Propertypublicstring  $path= ''''
Default value''Details
Type
string
Inherited_from
\modProcessor::$$path  
Inherited_from
\modObjectProcessor::$$path  
Inherited_from
\modObjectUpdateProcessor::$$path  
Inherited_from
\modUserUpdateProcessor::$$path  
Propertypublicstring  $permission= ''save_user''
inherited

The Permission to use when checking againstInherited from: \modUserUpdateProcessor::$$permission
Default value'save_user'Details
Type
string
Inherited_from
\modUserUpdateProcessor::$$permission  
Propertypublicstring  $primaryKeyField= ''id''
Default value'id'Details
Type
string
Inherited_from
\modObjectProcessor::$$primaryKeyField  
Inherited_from
\modObjectUpdateProcessor::$$primaryKeyField  
Inherited_from
\modUserUpdateProcessor::$$primaryKeyField  
Propertypublic\modUserProfile  $profile= ''
inherited

Inherited from: \modUserUpdateProcessor::$$profile
Details
Type
\modUserProfile
Inherited_from
\modUserUpdateProcessor::$$profile  
Propertypublicarray  $properties= 'array()'
Default valuearray()Details
Type
array
Inherited_from
\modProcessor::$$properties  
Inherited_from
\modObjectProcessor::$$properties  
Inherited_from
\modObjectUpdateProcessor::$$properties  
Inherited_from
\modUserUpdateProcessor::$$properties  
Propertypublic\modUserValidation  $validator= ''
inherited

Inherited from: \modUserUpdateProcessor::$$validator

Methods

methodpublic__construct( \modX $modx, array $properties = array() ) : void
Parameters
Name Type Description
$modx \modX

A reference to the modX instance

$properties array

An array of properties

methodprotected_decodeLiterals( string $string ) : string
Parameters
Name Type Description
$string string

The JSON-encoded string with encoded literals.

Returns
Type Description
string The JSON-encoded string with literals restored.
Details
Access
protected  
methodprotected_encodeLiterals( mixed $value, integer | string $key ) : void
Parameters
Name Type Description
$value mixed

&$value A reference to the value to be encoded if it is identified as a literal.

$key integer | string

The array key corresponding to the value.

Details
Access
protected  
methodpublicaddFieldError( string $key, string $message = '' ) : mixed
Parameters
Name Type Description
$key string
$message string
Returns
Type Description
mixed
methodpublicafterSave( ) : boolean
inherited

Override in your derivative class to do functionality after save() is run

Inherited from: \modUserUpdateProcessor::afterSave()
Returns
Type Description
boolean
methodpublicbeforeSave( ) : boolean
inherited

Override in your derivative class to do functionality before save() is run

Inherited from: \modUserUpdateProcessor::beforeSave()
Returns
Type Description
boolean
methodpublicbeforeSet( ) : boolean
inherited

Override in your derivative class to do functionality before the fields are set on the object

Inherited from: \modUserUpdateProcessor::beforeSet()
Returns
Type Description
boolean
methodpubliccheckActiveChange( ) : boolean | string
inherited

Check for an active/inactive status change

Inherited from: \modUserUpdateProcessor::checkActiveChange()
Returns
Type Description
boolean | string
methodpubliccheckPermissions( ) : boolean
Returns
Type Description
boolean
methodpubliccleanup( ) : array | string
inherited

Return the success message

Inherited from: \modUserUpdateProcessor::cleanup()
Returns
Type Description
array | string
methodpublicfailure( string $msg = '', mixed $object = null ) : array | string
Parameters
Name Type Description
$msg string
$object mixed
Returns
Type Description
array | string
methodpublicfireAfterActiveStatusChange( ) : void
inherited

Fire the active status change event

Inherited from: \modUserUpdateProcessor::fireAfterActiveStatusChange()
methodpublicfireAfterSaveEvent( ) : void
methodpublicfireBeforeSaveEvent( ) : boolean
inherited

Fire before save event. Return true to prevent saving.

Inherited from: \modObjectUpdateProcessor::fireBeforeSaveEvent()\modUserUpdateProcessor::fireBeforeSaveEvent()
Returns
Type Description
boolean
methodpublicgetInstance( \modX $modx,  $className, array $properties = array() ) : \modProcessor
staticinherited

Allow for Users to use derivative classes for their processors

Inherited from: \modUserUpdateProcessor::getInstance()
Parameters
Name Type Description
$modx \modX
$className
$properties array
Returns
Type Description
\modProcessor
Details
Static
 
methodpublicgetLanguageTopics( ) : array

Override this in your derivative class to provide the array of topics to load.

Returns
Type Description
array
methodpublicgetProperties( ) : array
Returns
Type Description
array
methodpublicgetProperty( string $k, mixed $default = null ) : mixed
Parameters
Name Type Description
$k string
$default mixed
Returns
Type Description
mixed
methodpublichasErrors( ) : boolean
Returns
Type Description
boolean
methodpublicinitialize( ) : boolean | string

Can be used to provide custom methods prior to processing. Return true to tell MODX that the Processor initialized successfully. If you return anything else, MODX will output that return value as an error message.

Returns
Type Description
boolean | string
methodpubliclogManagerAction( ) : void
methodpublicoutputArray( array $array, mixed $count = false ) : string

The JSON result includes two main elements, total and results. This format is used for list results.

Parameters
Name Type Description
$array array

An array of data objects.

$count mixed

The total number of objects. Used for pagination.

Returns
Type Description
string The JSON output.
Details
Access
public  
methodpublicprocess( ) : mixed
inherited

Run the processor and return the result. Override this in your derivative class to provide custom functionality.

Inherited from: \modObjectUpdateProcessor::process()\modUserUpdateProcessor::process()

Used here for pre-2.2-style processors.

Returns
Type Description
mixed
methodpublicprocessEventResponse( array | string $response, string $separator = "\n" ) : string
Parameters
Name Type Description
$response array | string

The response generated by the invokeEvent call

$separator string

The separator for each event response

Returns
Type Description
string The processed response.
methodpublicrun( ) : \modProcessorResponse
inherited

Run the processor, returning a modProcessorResponse object.

Inherited from: \modProcessor::run()\modObjectProcessor::run()\modObjectUpdateProcessor::run()\modUserUpdateProcessor::run()
Returns
Type Description
\modProcessorResponse
methodpublicsaveObject( ) : boolean
inherited

Abstract the saving of the object out to allow for transient and non-persistent object updating in derivative classes

Inherited from: \modObjectUpdateProcessor::saveObject()\modUserUpdateProcessor::saveObject()
Returns
Type Description
boolean
methodpublicsendNotificationEmail( ) : void
inherited

Send notification email for changed password

Inherited from: \modUserUpdateProcessor::sendNotificationEmail()
methodpublicsetCheckbox( string $k, boolean $force = false ) : int | null
inherited

Special helper method for handling checkboxes. Only set value if passed or $force is true, and check for a not empty value or string 'false'.

Inherited from: \modProcessor::setCheckbox()\modObjectProcessor::setCheckbox()\modObjectUpdateProcessor::setCheckbox()\modUserUpdateProcessor::setCheckbox()
Parameters
Name Type Description
$k string
$force boolean
Returns
Type Description
int | null
methodpublicsetDefaultProperties( array $properties = array() ) : array
Parameters
Name Type Description
$properties array
Returns
Type Description
array The newly merged properties array
methodpublicsetPath( string $path ) : void
Parameters
Name Type Description
$path string

The absolute path

methodpublicsetProfile( ) : \modUserProfile
inherited

Set the profile data for the user

Inherited from: \modUserUpdateProcessor::setProfile()
Returns
Type Description
\modUserProfile
methodpublicsetProperties( array $properties ) : void
Parameters
Name Type Description
$properties array

The properties, in array and key-value form, to run on this processor

methodpublicsetProperty( string $k, mixed $v ) : void
Parameters
Name Type Description
$k string
$v mixed
methodpublicsetRemoteData( ) : mixed
inherited

Set the remote data for the user

Inherited from: \modUserUpdateProcessor::setRemoteData()
Returns
Type Description
mixed
methodpublicsetUserGroups( ) : array
inherited

Set user groups for the user

Inherited from: \modUserUpdateProcessor::setUserGroups()
Returns
Type Description
array
methodpublicsuccess( string $msg = '', mixed $object = null ) : array | string
Parameters
Name Type Description
$msg string
$object mixed
Returns
Type Description
array | string
methodpublictoJSON( mixed $data ) : string
inherited

Converts PHP to JSON with JavaScript literals left in-tact.

Inherited from: \modProcessor::toJSON()\modObjectProcessor::toJSON()\modObjectUpdateProcessor::toJSON()\modUserUpdateProcessor::toJSON()

JSON does not allow JavaScript literals, but this function encodes certain identifiable literals and decodes them back into literals after modX::toJSON() formats the data.

Parameters
Name Type Description
$data mixed

The PHP data to be converted.

Returns
Type Description
string The extended JSON-encoded string.
Details
Access
public  
methodpublicunsetProperty( string $key ) : void
Parameters
Name Type Description
$key string
Documentation was generated by DocBlox 0.18.1.