diff --git a/webapp/controller/UserController.class.php b/webapp/controller/UserController.class.php index a0f03a83..c70ae526 100644 --- a/webapp/controller/UserController.class.php +++ b/webapp/controller/UserController.class.php @@ -931,25 +931,25 @@ class UserController extends BaseAuthedController { return; } $rspObj = json_decode($response, true); - if (empty($rspObj['data']['address'])) { + if ($rspObj['errcode'] != 0) { + myself()->_rspErr(500, 'server internal error'); + return; + } + if ($rspObj['account_id'] != myself()->_getAccountId()) { + myself()->_rspErr(500, 'server internal error'); + return; + } + if (empty($rspObj['address'])) { User::Update(array( 'address' => null )); myself()->_rspOk(); - die(); return; } - $address = strtolower($rspObj['data']['address']); + $address = strtolower($rspObj['address']); $oldUser = User::findByAddress($address); if ($oldUser) { if ($oldUser['account_id'] != myself()->_getAccountId()) { - if (!phpcommon\isSameSeriesAccount( - $oldUser['account_id'], - myself()->_getAccountId() - )) { - myself()->_rspErr(1, 'is not SameSeriesAccount'); - return; - } User::updateOther( $oldUser['account_id'], array(