summaryrefslogtreecommitdiffstats
path: root/app/login.go
diff options
context:
space:
mode:
Diffstat (limited to 'app/login.go')
-rw-r--r--app/login.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/login.go b/app/login.go
index 4c7ab8474..4f9284140 100644
--- a/app/login.go
+++ b/app/login.go
@@ -122,7 +122,17 @@ func DoLogin(w http.ResponseWriter, r *http.Request, user *model.User, deviceId
Secure: secure,
}
+ userCookie := &http.Cookie{
+ Name: model.SESSION_COOKIE_USER,
+ Value: user.Id,
+ Path: "/",
+ MaxAge: maxAge,
+ Expires: expiresAt,
+ Secure: secure,
+ }
+
http.SetCookie(w, sessionCookie)
+ http.SetCookie(w, userCookie)
return session, nil
}