From 0ba89aa35180f965e8c8ca85560d7ee7a1849b3c Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 24 May 2022 09:02:56 -0700 Subject: Fix login issue --- src/main/java/org/traccar/api/resource/SessionResource.java | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/main/java/org/traccar/api/resource/SessionResource.java b/src/main/java/org/traccar/api/resource/SessionResource.java index 136aab0eb..1ccba1270 100644 --- a/src/main/java/org/traccar/api/resource/SessionResource.java +++ b/src/main/java/org/traccar/api/resource/SessionResource.java @@ -110,6 +110,7 @@ public class SessionResource extends BaseResource { @FormParam("email") String email, @FormParam("password") String password) throws StorageException { User user = Context.getPermissionsManager().login(email, password); if (user != null) { + request.getSession().setAttribute(USER_ID_KEY, user.getId()); LogAction.login(user.getId(), ServletHelper.retrieveRemoteAddress(request)); return user; } else { -- cgit v1.2.3