Skip to content

Commit

Permalink
bugfix: user decode
Browse files Browse the repository at this point in the history
  • Loading branch information
imbugs committed Mar 4, 2013
1 parent bc4a32a commit 93565d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion protected/controllers/UserController.php
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions protected/models/ResetForm.php
Expand Up @@ -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'),
Expand Down

0 comments on commit 93565d4

Please sign in to comment.