Use SessionHelper instead of duplicate lines

This commit is contained in:
Axel Rieben 2024-10-31 20:08:56 +01:00
parent 4dbaac6301
commit ec11e58619

View File

@ -101,8 +101,7 @@ public class SessionResource extends BaseResource {
permissionsService.checkUser(getUserId(), userId);
User user = storage.getObject(User.class, new Request(
new Columns.All(), new Condition.Equals("id", userId)));
request.getSession().setAttribute(SessionHelper.USER_ID_KEY, user.getId());
LogAction.login(user.getId(), WebHelper.retrieveRemoteAddress(request));
SessionHelper.userLogin(request, user, null);
return user;
}