mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-09 10:59:50 -04:00
fix logged_in_elsewhere to work when user never logged in before (new accounts)
This commit is contained in:
@@ -20,7 +20,8 @@ class User(UserMixin):
|
|||||||
return self.id
|
return self.id
|
||||||
|
|
||||||
def logged_in_elsewhere(self):
|
def logged_in_elsewhere(self):
|
||||||
return session.get('current_session_id') != self.current_session_id
|
# if the current user (ie: db object) has no session, they've never logged in before
|
||||||
|
return self.current_session_id is not None and session.get('current_session_id') != self.current_session_id
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_active(self):
|
def is_active(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user