public function actionReset($token = '')
 {
     $model = new LoginForm();
     $email = $model->checkResetToken($token);
     if (!empty($email)) {
         $status = 'emailfound';
     }
     if (isset($_POST['newpassword']) && trim($_POST['newpassword']) !== '') {
         if ($_POST['newpassword'] != $_POST['confirmpassword']) {
             $status = 'passwordnomatch';
         } else {
             $result = $model->changePassword($email, $_POST['newpassword']);
             $status = 'passwordchanged';
             $this->redirect(Yii::app()->createUrl('login/index'));
         }
     }
     //echo $email;
     $this->render('reset', array('email' => $email, 'status' => $status));
 }