public function ForcePasswordChangeMapper::getUserCreatedTime 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::getUserCreatedTime()
Get the timestamp at which a user account was created.
Parameters
int $uid: The User ID for the account whose creation time should be retrieved.
Return value
int The Unix timstamp at which the given account was created.
Overrides ForcePasswordChangeMapperInterface::getUserCreatedTime
File
- src/
Mapper/ ForcePasswordChangeMapper.php, line 38
Class
Namespace
Drupal\force_password_change\MapperCode
public function getUserCreatedTime($uid) {
return $this->connection
->select('users_field_data', 'ufd')
->fields('ufd', [
'created',
])
->condition('ufd.uid', $uid)
->execute()
->fetchField();
}