You are here

public function ForcePasswordChangeMapper::getLastChangeForRole 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::getLastChangeForRole()

Retrieve the last timestamp at which all users in a role were forced to change their password.

Parameters

string $rid: The Role ID for which the timestamp should be retrieved.

Return value

int The Unix timestamp at which the users in the role were forced to change their password.

Overrides ForcePasswordChangeMapperInterface::getLastChangeForRole

File

src/Mapper/ForcePasswordChangeMapper.php, line 63

Class

ForcePasswordChangeMapper

Namespace

Drupal\force_password_change\Mapper

Code

public function getLastChangeForRole($rid) {
  return $this->connection
    ->query('SELECT last_force FROM {force_password_change_roles} WHERE rid = :rid', [
    ':rid' => $rid,
  ])
    ->fetchField();
}