This commit is contained in:
aozhiwei 2023-08-10 15:24:48 +08:00
parent 627a3965d0
commit b572887ca2
2 changed files with 17 additions and 0 deletions

View File

@ -810,6 +810,12 @@ class UserController extends BaseAuthedController {
$oldUser = User::findByAddress($address);
if ($oldUser) {
if ($oldUser['account_id'] != myself()->_getAccountId()) {
User::updateOther(
$oldUser['account_id'],
array(
'address' => null
)
);
}
}
User::Update(array(

View File

@ -371,6 +371,17 @@ class User extends BaseModel {
);
}
public static function updateOther($accountId, $fieldsKv){
SqlHelper::update
(myself()->_getMysql($accountId),
't_user',
array(
'account_id' => $accountId,
),
$fieldsKv
);
}
public static function updateLikeCount($targetId){
SqlHelper::update
(myself()->_getSelfMysql(),