You are here

public function ForcePasswordChangeService::getNonPendingUsersForRole in Force Password Change 2.0.x

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

Retrieve the user accounts of users in the role who do not have a pending forced password change.

Parameters

string $rid: The Role ID of the role for which users without a pending forced password change should be retrieved.

Overrides ForcePasswordChangeServiceInterface::getNonPendingUsersForRole

File

src/Service/ForcePasswordChangeService.php, line 197

Class

ForcePasswordChangeService

Namespace

Drupal\force_password_change\Service

Code

public function getNonPendingUsersForRole($rid) {
  $rid = $rid == 'authenticated' ? FALSE : $rid;
  $uids = $this->mapper
    ->getNonPendingUserIds($rid);
  return $this
    ->userLoadMultiple($uids);
}