public function recoverPassword($email) { $this->_profile = Application_Model_User_Profile::getByEmail($email); if ($this->_hasConfirmedMail()) { $mail = new Application_Model_Mail_ForgotPassword($this->_profile); $mail->sendToUser(); } else { throw new Exception('Email не подтвержден'); } }
public function getFacebookUser() { if ($this->getIdUser() === 0) { $profile = Application_Model_User_Profile::getByEmail($this->getUserEmail()); if (!$profile instanceof Application_Model_User_Profile) { $profile = parent::_createProfile(); $profile->setConfirmedEmail(); $profile->save(); } else { $this->setProfile($profile); $this->save(); } } else { $profile = parent::getProfile(); } return $profile; }