* fix bug for update user.

This commit is contained in:
wangyidong
2015-12-03 15:49:31 +08:00
parent 6ae74c1430
commit b3f919b697
+1 -2
View File
@@ -328,7 +328,6 @@ class userModel extends model
$userID = $oldUser->id;
$user = fixer::input('post')
->setDefault('join', '0000-00-00')
->setDefault('password', '')
->setIF($this->post->password1 != false, 'password', md5($this->post->password1))
->remove('password1, password2, groups,verifyPassword')
->get();
@@ -377,7 +376,7 @@ class userModel extends model
$this->dao->insert(TABLE_USERGROUP)->data($data)->exec();
}
}
if($user->password and $user->account == $this->app->user->account) $this->app->user->password = $user->password;
if(!empty($user->password) and $user->account == $this->app->user->account) $this->app->user->password = $user->password;
if(!dao::isError())
{