Commit f523aa9f by 王昆

gsb

parent 73d920e7
......@@ -171,14 +171,15 @@ class SsmuserService extends ServiceBase {
let password = this.trim(params.password);
let pwd = await this.getEncryptStr(password);
let userList = await this.dao.getSingleSsmUser({ucname});
if (!userList || userList.length == 0) {
let user = await this.dao.getSingleSsmUser({ucname});
if (!user || user.length == 0) {
return system.getResult(null, "用户名或密码错误");
}
let user = userList[0];
user = user[0] || null;
if(!user || pwd != user.password) {
return system.getResult(null, "用户名或密码错误");
}
if(!user.isEnabled) {
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