mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
fix token, update setting
This commit is contained in:
1 parent
1074c21c00
commit
31622bc580
4 files changed
+35
-27
No files matched your search
@@ -39,7 +39,7 @@ class UserLoginHandler extends Handler {
|
||||
}) {
|
||||
const udoc = await user.getByUname(domainId, uname);
|
||||
if (!udoc) throw new LoginError(uname);
|
||||
if (udoc) udoc.checkPassword(password);
|
||||
udoc.checkPassword(password);
|
||||
await user.setById(udoc._id, { loginat: new Date(), loginip: this.request.ip });
|
||||
if (udoc.priv === PRIV_NONE) throw new BlacklistedError(uname);
|
||||
this.session.uid = udoc._id;
|
||||
|
||||
Reference in new issue
Block a user