Merge pull request #3287 from alphagov/check-current-user-is_authenticated

Reorder the methods called in sign out
This commit is contained in:
Rebecca Law
2020-02-05 16:29:31 +00:00
committed by GitHub

View File

@@ -154,10 +154,10 @@ class User(JSONModel, UserMixin):
return True
def sign_out(self):
# Update the db so the server also knows the user is logged out.
session.clear()
# Update the db so the server also knows the user is logged out.
self.update(current_session_id=None)
logout_user()
return self.update(current_session_id=None)
@property
def sms_auth(self):