コード例 #1
0
ファイル: Auth.php プロジェクト: RadioCampusFrance/airtime
 public function sendPasswordRestoreLink($user, $view)
 {
     $token = $this->generateToken('password.restore', $user->getDbId());
     $e_link_protocol = empty($_SERVER['HTTPS']) ? "http" : "https";
     $e_link_base = $_SERVER['SERVER_NAME'];
     $e_link_port = $_SERVER['SERVER_PORT'];
     $e_link_path = $view->url(array('user_id' => $user->getDbId(), 'token' => $token), 'password-change');
     $message = sprintf(_("Hi %s, \n\nClick this link to reset your password: "******"{$e_link_protocol}://{$e_link_base}:{$e_link_port}{$e_link_path}";
     $success = Application_Model_Email::send(_('Airtime Password Reset'), $message, $user->getDbEmail());
     return $success;
 }