aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-05-24 09:02:56 -0700
committerAnton Tananaev <anton@traccar.org>2022-05-24 09:02:56 -0700
commit0ba89aa35180f965e8c8ca85560d7ee7a1849b3c (patch)
tree23d280b860c9467218f3f5e2ab1cd7e7717cfa4d /src
parentfed6597faa141ba3ee8b11bff2c987ac981fd91b (diff)
downloadtrackermap-server-0ba89aa35180f965e8c8ca85560d7ee7a1849b3c.tar.gz
trackermap-server-0ba89aa35180f965e8c8ca85560d7ee7a1849b3c.tar.bz2
trackermap-server-0ba89aa35180f965e8c8ca85560d7ee7a1849b3c.zip
Fix login issue
Diffstat (limited to 'src')
-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 {