mirror of
https://github.com/steedos/steedos-platform
synced 2024-11-22 00:01:52 +00:00
用户停用的时候,对应的 user 和 space_users 记录,手机号和邮箱都清空 #2748
This commit is contained in:
parent
5413221828
commit
4c3bce1544
@ -1151,7 +1151,16 @@ let methods = {
|
||||
});
|
||||
return;
|
||||
}
|
||||
let result = await steedosSchema.getObject('space_users').updateOne(params._id, { user_accepted: false, profile: spaceUser.profile});
|
||||
let result = await steedosSchema.getObject('users').directUpdate(spaceUser.user, { user_accepted: false, profile: spaceUser.profile, username: null , mobile: null, mobile_verified: false, email: null, email_verified: false, emails: [], steedos_id: null});
|
||||
if(!result){
|
||||
res.status(400).send({
|
||||
success: false,
|
||||
error: {
|
||||
reason: "The users directUpdate return nothing."
|
||||
}
|
||||
});
|
||||
}
|
||||
result = await steedosSchema.getObject('space_users').directUpdate(params._id, { user_accepted: false, profile: spaceUser.profile, username: null , mobile: null, mobile_verified: false, email: null, email_verified: false });
|
||||
if(result){
|
||||
res.status(200).send({ success: true });
|
||||
}
|
||||
@ -1159,7 +1168,7 @@ let methods = {
|
||||
res.status(400).send({
|
||||
success: false,
|
||||
error: {
|
||||
reason: "The object updateOne return nothing."
|
||||
reason: "The space_users directUpdate return nothing."
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user