Commit 73d920e7 by 王昆

gsb

parent bbfd0b39
...@@ -171,12 +171,14 @@ class SsmuserService extends ServiceBase { ...@@ -171,12 +171,14 @@ class SsmuserService extends ServiceBase {
let password = this.trim(params.password); let password = this.trim(params.password);
let pwd = await this.getEncryptStr(password); let pwd = await this.getEncryptStr(password);
var user = await this.dao.getSingleSsmUser({ucname}); let userList = await this.dao.getSingleSsmUser({ucname});
user = user[0] || null; if (!userList || userList.length == 0) {
return system.getResult(null, "用户名或密码错误");
}
let user = userList[0];
if(!user || pwd != user.password) { if(!user || pwd != user.password) {
return system.getResult(null, "用户名或密码错误"); return system.getResult(null, "用户名或密码错误");
} }
if(!user.isEnabled) { if(!user.isEnabled) {
return system.getResult(null, "用户已禁用"); return system.getResult(null, "用户已禁用");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment