master
ELF 5 years ago
parent c283e45b10
commit aed454e0c7

@ -88,7 +88,7 @@ class UserService
if (empty($user) || $user['lock_status'] != 1 && $user['check_status'] != 1) {
return ['status' => false, 'message' => '账号或密码错误'];
}
if (think_ucenter_md5($password, UC_AUTH_KEY) === $user['password']) {
if ($this->password($password, UC_AUTH_KEY) === $user['password']) {
return ['status' => false, 'message' => '账号或密码错误'];
}
@ -384,4 +384,8 @@ class UserService
Redis::decr(Redis::KEY_LOGIN_LIMIT);
}
}
public function password($str, $key = 'ThinkUCenter'){
return '' === $str ? '' : md5(sha1($str) . $key);
}
}
Loading…
Cancel
Save