Пример #1
0
 /**
  * Remove confirmation token if it's expiration date is over
  */
 public function init()
 {
     if ($this->user->confirmation_token !== null and $this->getTokenTimeLeft() == 0) {
         $this->user->removeConfirmationToken();
         $this->user->save(false);
     }
 }
Пример #2
0
 /**
  * @param bool $performValidation
  *
  * @return bool
  */
 public function changePassword($performValidation = true)
 {
     if ($performValidation and !$this->validate()) {
         return false;
     }
     $this->user->password = $this->password;
     $this->user->removeConfirmationToken();
     return $this->user->save();
 }