mirror of
https://github.com/traccar/traccar.git
synced 2025-01-09 04:07:38 +08:00
Use SessionHelper instead of duplicate lines
This commit is contained in:
parent
4dbaac6301
commit
ec11e58619
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user