diff --git a/protected/controllers/UserController.php b/protected/controllers/UserController.php index dd5d4de..b01464b 100644 --- a/protected/controllers/UserController.php +++ b/protected/controllers/UserController.php @@ -123,7 +123,8 @@ public function actionReset() { $model = new ResetForm; $model->resetKey = Yii::app()->getRequest()->getParam("resetKey", ""); $model->username = Yii::app()->getRequest()->getParam("username", ""); - + $model->username = StringUtils::decode($model->username); + if(isset($_POST['ResetForm'])) { $model->attributes=$_POST['ResetForm']; // validate user input and redirect to the previous page if valid diff --git a/protected/models/ResetForm.php b/protected/models/ResetForm.php index ee61b4f..4198255 100644 --- a/protected/models/ResetForm.php +++ b/protected/models/ResetForm.php @@ -7,14 +7,13 @@ class ResetForm extends CFormModel { public $success; private $userInfo; - + /** * Declares the validation rules. * The rules state that username and newPasswd are required, * and newPasswd needs to be authenticated. */ public function rules() { - $userInfo->username = StringUtils::decode($this->username); return array( // username required array('username, newPasswd, verifyPasswd, resetKey', 'required'),