fix deactivate

This commit is contained in:
Kenneth Kehl
2025-08-15 09:02:58 -07:00
parent a48269d210
commit 20db7929b5
2 changed files with 5 additions and 3 deletions

View File

@@ -146,10 +146,11 @@ def _do_login_dot_gov(): # $ pragma: no cover
# return verify_email(user, redirect_url)
usr = User.from_email_address(user["email_address"])
current_app.logger.info(f"activating user {usr.id} #notify-admin-1505")
# New users on the invite path need activation
if not usr.is_active:
activate_user(usr.id)
# if not usr.is_active:
current_app.logger.info(f"activating user {usr.id} #notify-admin-1505")
activate_user(usr.id)
except BaseException as be: # noqa B036
current_app.logger.error(f"Error signing in: {be} #notify-admin-1505 ")
error(401)

View File

@@ -27,6 +27,7 @@ def _sign_out_at_login_dot_gov():
def sign_out():
if current_user.is_authenticated:
# current_user.deactivate()
session.clear()
current_user.sign_out()