diff --git a/third_party/phpcommon b/third_party/phpcommon index 3fc9e3c..119990e 160000 --- a/third_party/phpcommon +++ b/third_party/phpcommon @@ -1 +1 @@ -Subproject commit 3fc9e3c7657803eed51f7c2ee34af6185855409b +Subproject commit 119990eeeac4281031895c17c9983b523699d757 diff --git a/webapp/controller/UserController.class.php b/webapp/controller/UserController.class.php index 7b5d5d5..89fab2d 100644 --- a/webapp/controller/UserController.class.php +++ b/webapp/controller/UserController.class.php @@ -166,11 +166,11 @@ class UserController extends BaseAuthedController { return; } $nameService = new services\NameService(); - if (!$nameService->verifyNameSign($param1, $param2)){ + if (!$nameService->verifyNameSign($name, $nameSign)){ $this->_rspErr(1, '参数错误名,签名校验失败'); return; } - if (!$nameService->nameUsed($param1)){ + if ($nameService->nameUsed($name)){ $this->_rspErr(2, '名字已被占用'); return; } @@ -178,11 +178,11 @@ class UserController extends BaseAuthedController { $this->_rspErr(1, '参数错误名,sex不合法'); return; } - if (User::isValidHeadId($userInfo, $headId)) { + if (!User::isValidHeadId($userInfo, $headId)) { $this->_rspErr(1, '参数错误名,head_id不合法'); return; } - if (User::isValidHeadFrame($userInfo, $headFrame)) { + if (!User::isValidHeadFrame($userInfo, $headFrame)) { $this->_rspErr(1, '参数错误名,head_frame不合法'); return; } @@ -206,7 +206,7 @@ class UserController extends BaseAuthedController { public function update() { - $userInfo = $this->_ormGetUserInfo(); + $userInfo = $this->_getOrmUserInfo(); $validFields = array( 'sex' => array( 'field_name' => 'sex',