/** * Fetch password * * @return bool */ public function fetchPassword() { if (!$this->isSaved()) { return false; } //Получим новый пароль $password_new = Default_Plugin_SysBox::createPassword($this->_config_password); $this->_newPassword = $password_new; $this->profile->new_password = md5($this->_newPassword); $this->profile->new_password_ts = time(); $this->profile->new_password_key = md5(uniqid() . $this->getId() . $this->_newPassword); // save new password to profile and send e-mail $this->profile->save(); $arrMail = $this->_createFetchPassword_Email('user-fetch-password.tpl'); $this->sendEmail($arrMail); return true; }