浏览代码

登录BUG修复

anderx 7 年之前
父节点
当前提交
1913115ca6
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/main/java/com/goafanti/core/shiro/token/TokenManager.java

+ 1 - 1
src/main/java/com/goafanti/core/shiro/token/TokenManager.java

@@ -166,7 +166,7 @@ public class TokenManager {
 	 * @return
 	 * @return
 	 */
 	 */
 	public static User login(User user, Boolean rememberMe) {
 	public static User login(User user, Boolean rememberMe) {
-		ShiroToken token = new ShiroToken(user.getUsername(), user.getPassword(), user.getType(),AFTConstants.USER_SOURCE_REGISTER);
+		ShiroToken token = new ShiroToken(user.getMobile(), user.getPassword(), user.getType(),AFTConstants.USER_SOURCE_REGISTER);
 		token.setRememberMe(null == rememberMe ? false : rememberMe);
 		token.setRememberMe(null == rememberMe ? false : rememberMe);
 		SecurityUtils.getSubject().login(token);
 		SecurityUtils.getSubject().login(token);
 		setVal2Session(CSRF_TOKEN, UUID.randomUUID().toString().replace("-", ""));
 		setVal2Session(CSRF_TOKEN, UUID.randomUUID().toString().replace("-", ""));