Commit 1692e5d2 authored by hezhen's avatar hezhen

123

parent 18639450
......@@ -52,9 +52,11 @@ public class PermissionService {
public UserInfo validate(String username,String password){
UserInfo info = new UserInfo();
User user = userBiz.getUserByUsername(username);
if (encoder.matches(password, user.getPassword())) {
BeanUtils.copyProperties(user, info);
info.setId(user.getId().toString());
if (user!=null){
if (encoder.matches(password, user.getPassword())) {
BeanUtils.copyProperties(user, info);
info.setId(user.getId().toString());
}
}
return info;
}
......
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