You are here

public function ForcePasswordChangeMapper::getRoleExpiryTimePeriods in Force Password Change 2.0.x

Same name and namespace in other branches
  1. 8 src/Mapper/ForcePasswordChangeMapper.php \Drupal\force_password_change\Mapper\ForcePasswordChangeMapper::getRoleExpiryTimePeriods()

Retrieve the expiry time for the given roles.

Return value

array An array of time periods in seconds after which passwords for users in the role will expire, keyed by Role ID.

Overrides ForcePasswordChangeMapperInterface::getRoleExpiryTimePeriods

File

src/Mapper/ForcePasswordChangeMapper.php, line 177

Class

ForcePasswordChangeMapper

Namespace

Drupal\force_password_change\Mapper

Code

public function getRoleExpiryTimePeriods() {
  return $this->connection
    ->query('SELECT rid, expiry, weight from {force_password_change_expiry} ORDER BY weight, rid')
    ->fetchAll();
}