@@ -60,7 +60,7 @@ public class UserRealm extends AuthorizingRealm {
return new SimpleAuthenticationInfo(aftUser, aftUser.getPassword(), passwordUtil.getAftSalt(aftUser),
getName());
} else {
- User user = userService.selectByNameAndType(token.getUsername(), null);
+ User user = userService.selectByNameAndType(token.getUsername(), token.getType());
if (null == user) {
throw new UnknownAccountException();
}