1
This commit is contained in:
parent
74fbdf4cf9
commit
563792fc6e
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user