public function ForcePasswordChangeService::forceUsersPasswordChange in Force Password Change 2.0.x
Same name and namespace in other branches
- 8 src/Service/ForcePasswordChangeService.php \Drupal\force_password_change\Service\ForcePasswordChangeService::forceUsersPasswordChange()
Force a password change for the given users.
Parameters
array $uids: An array of User IDs for users who should be forced to change their password.
Overrides ForcePasswordChangeServiceInterface::forceUsersPasswordChange
File
- src/
Service/ ForcePasswordChangeService.php, line 76
Class
Namespace
Drupal\force_password_change\ServiceCode
public function forceUsersPasswordChange($uids = []) {
if (!count($uids)) {
$uids = $this->mapper
->getActiveUserIds();
}
foreach ($uids as $uid) {
$this
->forceUserPasswordChange($uid);
$this
->registerForcePasswordTime($uid);
}
}