1
This commit is contained in:
parent
74fbdf4cf9
commit
563792fc6e
@ -931,25 +931,25 @@ class UserController extends BaseAuthedController {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$rspObj = json_decode($response, true);
|
$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(
|
User::Update(array(
|
||||||
'address' => null
|
'address' => null
|
||||||
));
|
));
|
||||||
myself()->_rspOk();
|
myself()->_rspOk();
|
||||||
die();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$address = strtolower($rspObj['data']['address']);
|
$address = strtolower($rspObj['address']);
|
||||||
$oldUser = User::findByAddress($address);
|
$oldUser = User::findByAddress($address);
|
||||||
if ($oldUser) {
|
if ($oldUser) {
|
||||||
if ($oldUser['account_id'] != myself()->_getAccountId()) {
|
if ($oldUser['account_id'] != myself()->_getAccountId()) {
|
||||||
if (!phpcommon\isSameSeriesAccount(
|
|
||||||
$oldUser['account_id'],
|
|
||||||
myself()->_getAccountId()
|
|
||||||
)) {
|
|
||||||
myself()->_rspErr(1, 'is not SameSeriesAccount');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
User::updateOther(
|
User::updateOther(
|
||||||
$oldUser['account_id'],
|
$oldUser['account_id'],
|
||||||
array(
|
array(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user