Example #1
0
 public function actionForgot()
 {
     $model = new ForgotForm();
     if (isset($_POST['ForgotForm'])) {
         $model->attributes = $_POST['ForgotForm'];
         if ($model->validate() && $model->forgot()) {
             $this->render('forgotok', array('model' => $model));
             exit;
         }
     }
     $this->_pageTitle = '找回密码' . API::lchart();
     $this->render('forgot', array('model' => $model));
 }
Example #2
0
 public function actionForgot()
 {
     $sended = null;
     $model = new ForgotForm();
     if (isset($_POST['ForgotForm'])) {
         $model->setAttributes($_POST['ForgotForm']);
         if ($model->validate()) {
             Mailer::sendForgotMail($model->email);
             $sended = true;
         } else {
             $sended = false;
         }
     }
     $this->render('forgot', array('sended' => $sended, 'model' => $model));
 }
Example #3
0
 public function actionForgot()
 {
     $model = new ForgotForm();
     if (isset($_POST['ForgotForm'])) {
         $model->attributes = $_POST['ForgotForm'];
         if ($model->validate() && $model->forgot()) {
             $this->redirect(array('admin/category/iroot'));
         }
     }
     $this->render('forgot', array('model' => $model));
 }