user update should proc with api key and cookie login too

This commit is contained in:
Athou
2014-08-15 12:18:10 +02:00
parent 1456cc40e1
commit 9701af0736
2 changed files with 28 additions and 20 deletions

View File

@@ -67,7 +67,10 @@ public class SecurityCheckProvider implements InjectableProvider<SecurityCheck,
HttpSession session = request.getSession(false);
if (session != null) {
User user = (User) session.getAttribute(CommaFeedApplication.SESSION_USER);
return Optional.fromNullable(user);
if (user != null) {
userService.afterLogin(user);
return Optional.of(user);
}
}
return Optional.absent();
}