From 563792fc6e3ad436d3227dbe27afd2b87452a7f5 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 7 Jun 2024 11:19:45 +0800 Subject: [PATCH] 1 --- webapp/controller/UserController.class.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) 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(