aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/traccar/api/resource/SessionResource.java1
1 files changed, 1 insertions, 0 deletions
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 {