Пример #1
0
 /**
  * Checks whether the user's credentials (password) has expired.
  *
  * Implements AdvancedUserInterface
  *
  * @return Boolean true if the user's credentials are non expired, false otherwise
  */
 public function isCredentialsNonExpired()
 {
     if (true === $this->user->getCredentialsExpired()) {
         return false;
     }
     if (null !== $this->user->getCredentialsExpireAt() && $this->user->getCredentialsExpireAt()->getTimestamp() < time()) {
         return false;
     }
     return true;
 }