Enable email notifications on claim login

This commit is contained in:
rubenwardy
2020-12-15 16:24:49 +00:00
parent 7a4335b8bc
commit c44cc8082c
2 changed files with 4 additions and 3 deletions

View File

@@ -152,6 +152,7 @@ def make_flask_login_password(plaintext):
def login_user_set_active(user: User, *args, **kwargs):
if user.rank == UserRank.NOT_JOINED and user.email is None:
user.rank = UserRank.MEMBER
user.notification_preferences = UserNotificationPreferences(user)
user.is_active = True
db.session.commit()