private function UserCredentials::setPassword in DRD Agent 8.3
Same name and namespace in other branches
- 4.0.x src/Agent/Action/UserCredentials.php \Drupal\drd_agent\Agent\Action\UserCredentials::setPassword()
Callback to set the new password.
Parameters
\Drupal\user\Entity\User $account: User account which should be changed.
array $args: Array of arguments.
1 call to UserCredentials::setPassword()
- UserCredentials::execute in src/
Agent/ Action/ UserCredentials.php - Execute an action.
File
- src/
Agent/ Action/ UserCredentials.php, line 70
Class
- UserCredentials
- Provides a 'UserCredentials' code.
Namespace
Drupal\drd_agent\Agent\ActionCode
private function setPassword(User $account, array $args) {
if (empty($args['password'])) {
return;
}
$account
->setPassword($args['password']);
}