1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-16 15:19:06 +00:00

[shibboleth] Fix multiple emails sending issue.

issue: https://forum.seafile.com/t/seahub-not-sending-mail-invitations/7150/6
This commit is contained in:
zhengxie
2018-09-15 11:32:06 +08:00
parent ffce0e0778
commit 70ff50b30f

View File

@@ -51,6 +51,9 @@ class ShibbolethRemoteUserBackend(RemoteUserBackend):
email=username, is_active=self.activate_after_creation)
if user and self.activate_after_creation is False:
notify_admins_on_activate_request(user.email)
# Do not send follwing registration finished email (if any)
# which will cause confusion.
return user
if user and settings.NOTIFY_ADMIN_AFTER_REGISTRATION is True:
notify_admins_on_register_complete(user.email)
else: