TYPO3  7.6
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
BulkUpdateTask Class Reference
Inheritance diagram for BulkUpdateTask:
AbstractTask

Public Member Functions

 __construct ()
 
 execute ()
 
 getAdditionalInformation ()
 
 setCanDeactivateSelf ($canDeactivateSelf)
 
 getCanDeactivateSelf ()
 
 setNumberOfRecords ($numberOfRecords)
 
 getNumberOfRecords ()
 
- Public Member Functions inherited from AbstractTask
 __construct ()
 
 execute ()
 
 getAdditionalInformation ()
 
 setTaskUid ($id)
 
 getTaskUid ()
 
 getTaskTitle ()
 
 getTaskDescription ()
 
 getTaskClassName ()
 
 isDisabled ()
 
 setDisabled ($flag)
 
 setExecutionTime ($timestamp)
 
 getTaskGroup ()
 
 setTaskGroup ($taskGroup)
 
 getExecutionTime ()
 
 setDescription ($description)
 
 getDescription ()
 
 setScheduler ()
 
 unsetScheduler ()
 
 setExecution (\TYPO3\CMS\Scheduler\Execution $execution)
 
 getExecution ()
 
 getNextDueExecution ()
 
 areMultipleExecutionsAllowed ()
 
 isExecutionRunning ()
 
 markExecution ()
 
 unmarkExecution ($executionID,\Exception $failure=null)
 
 unmarkAllExecutions ()
 
 save ()
 
 stop ()
 
 remove ()
 

Protected Member Functions

 findUsersToUpdate ($mode)
 
 convertPasswords ($mode, array $users)
 
 isSaltedHash ($password)
 
 isMd5Password ($password)
 
 incrementUserRecordPointer ($mode, $number)
 
 activateSelf ()
 
 deactivateSelf ()
 

Protected Attributes

 $canDeactivateSelf = true
 
 $numberOfRecords = 250
 
 $userRecordPointer = array()
 
- Protected Attributes inherited from AbstractTask
 $scheduler
 
 $taskUid
 
 $disabled = false
 
 $execution
 
 $executionTime = 0
 
 $description = ''
 
 $taskGroup
 

Detailed Description

Update plaintext and hashed passwords of existing users to salted passwords.

Definition at line 20 of file BulkUpdateTask.php.

Constructor & Destructor Documentation

__construct ( )

Constructor initializes user record pointer

Definition at line 45 of file BulkUpdateTask.php.

Member Function Documentation

activateSelf ( )
protected

Activates this task instance. Uses setDisabled() method of parent

Returns
void

Definition at line 218 of file BulkUpdateTask.php.

References AbstractTask\setDisabled().

Referenced by BulkUpdateTask\execute().

convertPasswords (   $mode,
array  $users 
)
protected

Iterates over given user records and update password if needed.

Parameters
string$mode'FE' for frontend, 'BE' for backend user records
array$usersWith user uids and passwords
Returns
void

Definition at line 122 of file BulkUpdateTask.php.

References BulkUpdateTask\isSaltedHash().

Referenced by BulkUpdateTask\execute().

deactivateSelf ( )
protected

Deactivates this task instance. Uses setDisabled() method of parent

Returns
void

Definition at line 229 of file BulkUpdateTask.php.

References AbstractTask\setDisabled().

Referenced by BulkUpdateTask\execute().

execute ( )
findUsersToUpdate (   $mode)
protected

Finds next set of frontend or backend users to update.

Parameters
string$mode'FE' for frontend, 'BE' for backend user records
Returns
array Rows with uid and password

Definition at line 109 of file BulkUpdateTask.php.

References $GLOBALS.

Referenced by BulkUpdateTask\execute().

getAdditionalInformation ( )

Get additional information

Returns
string Additional information

Definition at line 97 of file BulkUpdateTask.php.

References $GLOBALS, BulkUpdateTask\getCanDeactivateSelf(), and BulkUpdateTask\getNumberOfRecords().

getCanDeactivateSelf ( )

Get if it can deactivate self

Returns
bool TRUE if task shall deactivate itself, FALSE otherwise

Definition at line 250 of file BulkUpdateTask.php.

References BulkUpdateTask\$canDeactivateSelf.

Referenced by BulkUpdateTask\getAdditionalInformation().

getNumberOfRecords ( )

Get number of records

Returns
int The number of records

Definition at line 271 of file BulkUpdateTask.php.

References BulkUpdateTask\$numberOfRecords.

Referenced by BulkUpdateTask\getAdditionalInformation().

incrementUserRecordPointer (   $mode,
  $number 
)
protected

Increments current user record counter by number of handled rows.

Parameters
string$mode'FE' for frontend, 'BE' for backend user records
int$numberNumber of handled rows
Returns
void

Definition at line 207 of file BulkUpdateTask.php.

Referenced by BulkUpdateTask\execute().

isMd5Password (   $password)
protected

Checks if a given password is a md5 hash, the default for be_user records before saltedpasswords.

Parameters
string$passwordThe password to test
Returns
bool TRUE if password is md5

Definition at line 195 of file BulkUpdateTask.php.

isSaltedHash (   $password)
protected

Passwords prefixed with M or C might be salted passwords: M means: originally a md5 hash before it was salted (eg. default be_users). C means: originally a cleartext password with lower hash looping count generated by t3sec_saltedpw. Both M and C will be updated to usual salted hashes on first login of user.

If a password does not start with M or C determine if a password is already a usual salted hash.

Parameters
string$passwordPassword
Returns
bool TRUE if password is a salted hash

Definition at line 175 of file BulkUpdateTask.php.

Referenced by BulkUpdateTask\convertPasswords().

setCanDeactivateSelf (   $canDeactivateSelf)

Set if it can deactivate self

Parameters
bool$canDeactivateSelf
Returns
void

Definition at line 240 of file BulkUpdateTask.php.

References BulkUpdateTask\$canDeactivateSelf.

setNumberOfRecords (   $numberOfRecords)

Set number of records

Parameters
int$numberOfRecords
Returns
void

Definition at line 261 of file BulkUpdateTask.php.

References BulkUpdateTask\$numberOfRecords.

Member Data Documentation

$canDeactivateSelf = true
protected
$numberOfRecords = 250
protected
$userRecordPointer = array()
protected

Definition at line 40 of file BulkUpdateTask.php.