summaryrefslogtreecommitdiffstats
path: root/api/user.go
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2015-10-20 14:49:42 -0700
committer=Corey Hulen <corey@hulen.com>2015-10-20 14:49:42 -0700
commit1fc12dd8ba2238eba7d154eee55e1381e7415372 (patch)
treedf92c9501d91b29801c87d38e7d0a0ec234bbcee /api/user.go
parentfa3a0df2b63d3f1bbbad44bf20afa48fed42aa06 (diff)
downloadchat-1fc12dd8ba2238eba7d154eee55e1381e7415372.tar.gz
chat-1fc12dd8ba2238eba7d154eee55e1381e7415372.tar.bz2
chat-1fc12dd8ba2238eba7d154eee55e1381e7415372.zip
Multi-session login
Diffstat (limited to 'api/user.go')
-rw-r--r--api/user.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/api/user.go b/api/user.go
index 1216dd30d..3770baa76 100644
--- a/api/user.go
+++ b/api/user.go
@@ -434,8 +434,6 @@ func Login(c *Context, w http.ResponseWriter, r *http.Request, user *model.User,
multiToken = originalMultiSessionCookie.Value
}
- fmt.Println("original: " + multiToken)
-
// Attempt to clean all the old tokens or duplicate tokens
if len(multiToken) > 0 {
tokens := strings.Split(multiToken, " ")
@@ -454,9 +452,7 @@ func Login(c *Context, w http.ResponseWriter, r *http.Request, user *model.User,
}
}
- multiToken = strings.TrimSpace(session.Token + " " + multiToken)
-
- fmt.Println("new: " + multiToken)
+ multiToken = strings.TrimSpace(multiToken + " " + session.Token)
multiSessionCookie := &http.Cookie{
Name: model.SESSION_COOKIE_TOKEN,