diff --git a/api/chalicelib/core/users.py b/api/chalicelib/core/users.py index 929c3b763..caf6a9ade 100644 --- a/api/chalicelib/core/users.py +++ b/api/chalicelib/core/users.py @@ -127,6 +127,8 @@ def update(tenant_id, user_id, changes, output=True): sub_query_bauth.append("changed_at = timezone('utc'::text, now())") sub_query_bauth.append("change_pwd_expire_at = NULL") sub_query_bauth.append("change_pwd_token = NULL") + sub_query_bauth.append("invitation_token = NULL") + sub_query_bauth.append("invited_at = NULL") else: sub_query_bauth.append(f"{helper.key_to_snake_case(key)} = %({key})s") else: diff --git a/ee/api/chalicelib/core/users.py b/ee/api/chalicelib/core/users.py index 01a5c7744..ff307d472 100644 --- a/ee/api/chalicelib/core/users.py +++ b/ee/api/chalicelib/core/users.py @@ -152,6 +152,8 @@ def update(tenant_id, user_id, changes, output=True): sub_query_bauth.append("changed_at = timezone('utc'::text, now())") sub_query_bauth.append("change_pwd_expire_at = NULL") sub_query_bauth.append("change_pwd_token = NULL") + sub_query_bauth.append("invitation_token = NULL") + sub_query_bauth.append("invited_at = NULL") else: sub_query_bauth.append(f"{helper.key_to_snake_case(key)} = %({key})s") else: