绑定游戏帐号时, 增加验证
This commit is contained in:
parent
62af6b9332
commit
d52ceb5e83
@ -82,7 +82,13 @@ class MailController extends BaseController {
|
|||||||
}
|
}
|
||||||
const openId = recordCode.openId
|
const openId = recordCode.openId
|
||||||
let userCheck = await ActivityUser.findOne({ clientId: openId, clientPlat: recordCode.plat })
|
let userCheck = await ActivityUser.findOne({ clientId: openId, clientPlat: recordCode.plat })
|
||||||
if (userCheck && userCheck.id !== user.id) {
|
let userCheck2 = await ActivityUser.findOne({ googleId: openId })
|
||||||
|
let userCheck3 = await ActivityUser.findOne({ emailId: openId })
|
||||||
|
if (
|
||||||
|
(userCheck && userCheck.id !== user.id) ||
|
||||||
|
(userCheck2 && userCheck2.id !== user.id) ||
|
||||||
|
(userCheck3 && userCheck3.id !== user.id)
|
||||||
|
) {
|
||||||
throw new ZError(13, 'Email already binded to another account')
|
throw new ZError(13, 'Email already binded to another account')
|
||||||
}
|
}
|
||||||
user.clientId = openId
|
user.clientId = openId
|
||||||
|
Loading…
x
Reference in New Issue
Block a user