Esempio n. 1
0
 /**
  * Check if token is valid.
  *
  * @return boolean true if token is valid
  */
 public function isValidToken()
 {
     if (Security::isValidToken($this->token, $this->module->recoveryWithin) === true) {
         return ($this->_user = User::findByToken($this->token, 'active')) !== null;
     }
     return false;
 }
Esempio n. 2
0
 /**
  * Activates user account.
  *
  * @return boolean true if account was successfully activated
  */
 public function activation()
 {
     $model = User::findByToken($this->token, 'inactive');
     if ($model !== null) {
         return $model->activation();
     }
     return false;
 }