From b82f6c0afe3a240d9a3ec732360350a82d63d648 Mon Sep 17 00:00:00 2001 From: Julian B Date: Wed, 18 Oct 2023 21:55:47 +0200 Subject: [PATCH] update email again --- myhpi/core/auth.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/myhpi/core/auth.py b/myhpi/core/auth.py index 9953bc4a..a3cf975a 100644 --- a/myhpi/core/auth.py +++ b/myhpi/core/auth.py @@ -32,6 +32,12 @@ def create_user(self, claims): return user + def update_user(self, user, claims): + user.email = mail_replacement(claims.get("email")) + user.save() + + return user + def filter_users_by_claims(self, claims): """Return all users matching the specified username.""" username = claims.get("sub")