You are here

public function EmailConfirmation::isExpired in Email confirmer 8

Returns if the confirmation is expired.

Return value

bool TRUE if the confirmation is expired, FALSE if it is active.

Overrides EmailConfirmationInterface::isExpired

2 calls to EmailConfirmation::isExpired()
EmailConfirmation::getStatus in src/Entity/EmailConfirmation.php
Returns the most representative current status of the email confirmation.
EmailConfirmation::isPending in src/Entity/EmailConfirmation.php
Returns if the confirmation is in a proper status to get response.

File

src/Entity/EmailConfirmation.php, line 197

Class

EmailConfirmation
Defines the email confirmation entity class.

Namespace

Drupal\email_confirmer\Entity

Code

public function isExpired() {
  return \Drupal::time()
    ->getRequestTime() > $this
    ->getCreatedTime() + \Drupal::config('email_confirmer.settings')
    ->get('hash_expiration');
}