mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-15 23:00:57 +00:00
Notify admins after register
This commit is contained in:
@@ -3,7 +3,8 @@ from django.db import connection
|
||||
from django.contrib.auth.backends import RemoteUserBackend
|
||||
|
||||
from seahub.base.accounts import User
|
||||
from registration.models import notify_admins_on_activate_request
|
||||
from registration.models import (
|
||||
notify_admins_on_activate_request, notify_admins_on_register_complete)
|
||||
|
||||
class ShibbolethRemoteUserBackend(RemoteUserBackend):
|
||||
"""
|
||||
@@ -50,6 +51,8 @@ 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)
|
||||
if user and settings.NOTIFY_ADMIN_AFTER_REGISTRATION is True:
|
||||
notify_admins_on_register_complete(user.email)
|
||||
else:
|
||||
user = None
|
||||
|
||||
|
Reference in New Issue
Block a user