Deauthenticate websockets and set status to offline when user account deactivated (#4551)

Этот коммит содержится в:
Joram Wilander
2016-11-15 10:38:58 -05:00
коммит произвёл enahum
родитель 526c392aad
Коммит 9c36ca9aca
4 изменённых файлов: 38 добавлений и 5 удалений

Просмотреть файл

@@ -140,7 +140,16 @@ func (webCon *WebConn) InvalidateCache() {
}
func (webCon *WebConn) isAuthenticated() bool {
return webCon.SessionToken != ""
if webCon.SessionToken == "" {
return false
}
session := GetSession(webCon.SessionToken)
if session == nil || session.IsExpired() {
return false
}
return true
}
func (webCon *WebConn) SendHello() {