You are here

public function ForcePasswordChangeService::forceUsersPasswordChange in Force Password Change 8

Same name and namespace in other branches
  1. 2.0.x src/Service/ForcePasswordChangeService.php \Drupal\force_password_change\Service\ForcePasswordChangeService::forceUsersPasswordChange()

*

Overrides ForcePasswordChangeServiceInterface::forceUsersPasswordChange

File

src/Service/ForcePasswordChangeService.php, line 64

Class

ForcePasswordChangeService

Namespace

Drupal\force_password_change\Service

Code

public function forceUsersPasswordChange($uids = []) {
  if (!count($uids)) {
    $uids = $this->mapper
      ->getActiveUserIds();
  }
  foreach ($uids as $uid) {
    $this
      ->forceUserPasswordChange($uid);
    $this
      ->registerForcePasswordTime($uid);
  }
}