You are here

protected function ForcePasswordChangeService::getRequestTime in Force Password Change 2.0.x

Same name and namespace in other branches
  1. 8 src/Service/ForcePasswordChangeService.php \Drupal\force_password_change\Service\ForcePasswordChangeService::getRequestTime()

Retrieve the timestamp for the current request. Spun out into a protected function to allow for overriding in Unit Tests.

Return value

int A UNIX timestamp representing the time of the current request

3 calls to ForcePasswordChangeService::getRequestTime()
ForcePasswordChangeService::checkForForce in src/Service/ForcePasswordChangeService.php
Check to see if the current user has a pending forced password change.
ForcePasswordChangeService::registerForcePasswordTime in src/Service/ForcePasswordChangeService.php
Register the time at which a user has been forced to change their password.
ForcePasswordChangeService::setChangedTimeForUser in src/Service/ForcePasswordChangeService.php
Set the last time a user's password was changed to the current timestamp.

File

src/Service/ForcePasswordChangeService.php, line 315

Class

ForcePasswordChangeService

Namespace

Drupal\force_password_change\Service

Code

protected function getRequestTime() {
  $request_time = $this->time
    ->getRequestTime();
  return $request_time;
}