Skip to content

Commit

Permalink
Merge pull request lingthio#267 from sabaigbe/patch-1
Browse files Browse the repository at this point in the history
Added send email check when changing usernames
  • Loading branch information
and-semakin authored Nov 30, 2019
2 parents 3bee35e + 4d01986 commit 67f071b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion flask_user/user_manager__views.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ def change_username_view(self):
self.db_manager.commit()

# Send username_changed email
self.email_manager.send_username_changed_email(current_user)
if self.USER_ENABLE_EMAIL and self.USER_SEND_USERNAME_CHANGED_EMAIL:
self.email_manager.send_username_changed_email(current_user)

# Send changed_username signal
signals.user_changed_username.send(current_app._get_current_object(), user=current_user)
Expand Down

0 comments on commit 67f071b

Please sign in to comment.