From b642c55f053583533e23b1fc7fc5ac318fcbd7f0 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 10 May 2018 15:04:57 +0300 Subject: using User::isAnonymous where possible --- .../service/security/deprecated/RequestParamHashRememberMeServices.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'juick-common/src/main/java/com/juick/service/security/deprecated') diff --git a/juick-common/src/main/java/com/juick/service/security/deprecated/RequestParamHashRememberMeServices.java b/juick-common/src/main/java/com/juick/service/security/deprecated/RequestParamHashRememberMeServices.java index 04794d07..3a1d129d 100644 --- a/juick-common/src/main/java/com/juick/service/security/deprecated/RequestParamHashRememberMeServices.java +++ b/juick-common/src/main/java/com/juick/service/security/deprecated/RequestParamHashRememberMeServices.java @@ -80,7 +80,7 @@ public class RequestParamHashRememberMeServices extends AbstractRememberMeServic if (StringUtils.isNotBlank(hash)) { User user = userService.getUserByHash(hash); - if (user.getUid() > 0) + if (!user.isAnonymous()) return new JuickUser(user); } throw new UsernameNotFoundException("User not found by hash " + hash); -- cgit v1.2.3