mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 22:23:42 +01:00
Use the query operator for existence check
This commit is contained in:
@@ -85,10 +85,10 @@ module.exports = UserSessionsManager =
|
|||||||
return callback(null, result)
|
return callback(null, result)
|
||||||
|
|
||||||
revokeAllUserSessions: (user, retain, callback=(err)->) ->
|
revokeAllUserSessions: (user, retain, callback=(err)->) ->
|
||||||
if !retain
|
if !retain?
|
||||||
retain = []
|
retain = []
|
||||||
retain = retain.map((i) -> UserSessionsManager._sessionKey(i))
|
retain = retain.map((i) -> UserSessionsManager._sessionKey(i))
|
||||||
if !user
|
if !user?
|
||||||
logger.log {}, "no user to revoke sessions for, returning"
|
logger.log {}, "no user to revoke sessions for, returning"
|
||||||
return callback(null)
|
return callback(null)
|
||||||
logger.log {user_id: user._id}, "revoking all existing sessions for user"
|
logger.log {user_id: user._id}, "revoking all existing sessions for user"
|
||||||
|
|||||||
Reference in New Issue
Block a user