You are here

public function ForcePasswordChangeMapper::getExpiryTimeFromRoles in Force Password Change 8

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

*

Overrides ForcePasswordChangeMapperInterface::getExpiryTimeFromRoles

File

src/Mapper/ForcePasswordChangeMapper.php, line 51

Class

ForcePasswordChangeMapper

Namespace

Drupal\force_password_change\Mapper

Code

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();
}