public function render() { if (empty($this->token)) { $this->setMetaTitle('通过电子邮件重设密码'); if ($this->user->hasLogin()) { $this->response->redirect($this->___settingUrl()); } parent::render('user/forgot.php'); } else { $this->setMetaTitle('重设密码'); parent::render('user/forgot_reset.php'); } }
public function render() { $this->current = 'login'; /** 如果已经登录 */ if ($this->user->hasLogin()) { /** 直接返回 */ $this->response->redirect($this->options->index); } if ($this->request->isPost() || $this->request->isAjax()) { $this->doLogin(); } else { $this->setMetaTitle('登录'); parent::render('user/login.php'); } }
public function render() { $this->current = 'register'; // 如果已经登录 if ($this->user->hasLogin()) { // 直接返回首页 $this->response->redirect($this->options->index); } if ($this->request->isPost() || $this->request->isAjax()) { $this->doRegister(); } else { $this->_metaTitle = '注册'; parent::render('user/register.php'); } }
public function avatar() { $this->setMetaTitle('设置头像'); parent::render('user/setting_avatar.php'); }