You are here

public function ForcePasswordChangeService::getUserCountForRole 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::getUserCountForRole()

Get the number of users in the given role.

Parameters

string $rid: The Role for which the user count should be returned.

Return value

int The number of users in the role.

Overrides ForcePasswordChangeServiceInterface::getUserCountForRole

File

src/Service/ForcePasswordChangeService.php, line 174

Class

ForcePasswordChangeService

Namespace

Drupal\force_password_change\Service

Code

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