public function ForcePasswordChangeMapper::getExpiryTimeFromRoles in Force Password Change 2.0.x
Same name and namespace in other branches
- 8 src/Mapper/ForcePasswordChangeMapper.php \Drupal\force_password_change\Mapper\ForcePasswordChangeMapper::getExpiryTimeFromRoles()
Retrieve the highest priority expiry time from.
Parameters
array $rids: An array of Role Ids (strings) of roles whose expiry time periods should be checked.
Return value
bool|int The number of seconds of the role with the highest priority after which a users password should expire. FALSE if no expiry time was found.
Overrides ForcePasswordChangeMapperInterface::getExpiryTimeFromRoles
File
- src/
Mapper/ ForcePasswordChangeMapper.php, line 49
Class
Namespace
Drupal\force_password_change\MapperCode
public function getExpiryTimeFromRoles(array $rids) {
return $this->connection
->select('force_password_change_expiry', 'fpce')
->fields('fpce', [
'expiry',
])
->condition('fpce.rid', $rids, 'IN')
->orderBy('fpce.weight')
->range(0, 1)
->addTag('force_password_change_expiry_check')
->execute()
->fetchField();
}