Email when user registers

Issue #314 closed
zwarmapapa created an issue

Is there a way to prevent admins from receiving an email whenever a user registers?

It's getting a bit spammy.

Comments (4)

  1. Thomas De Schampheleire

    A built-in method is not present at the moment. You could make following local change to achieve it, though:

    diff --git a/kallithea/model/user.py b/kallithea/model/user.py
    --- a/kallithea/model/user.py
    +++ b/kallithea/model/user.py
    @@ -200,10 +200,11 @@ class UserModel(object):
                 'new_username': new_user.username,
                 'new_email': new_user.email,
                 'new_full_name': new_user.full_name}
    -        NotificationModel().create(created_by=new_user, subject=subject,
    -                                   body=body, recipients=None,
    -                                   type_=Notification.TYPE_REGISTRATION,
    -                                   email_kwargs=email_kwargs)
    +        # locally disabling admin mail for user registration...
    +        #NotificationModel().create(created_by=new_user, subject=subject,
    +        #                           body=body, recipients=None,
    +        #                           type_=Notification.TYPE_REGISTRATION,
    +        #                           email_kwargs=email_kwargs)
    
         def update(self, user_id, form_data, skip_attrs=None):
             from kallithea.lib.auth import get_crypt_password
    
  2. Thomas De Schampheleire

    Note that I guess it would be nice to have actual settings for that in the Admin Settings. But as this is not a top priority I will close this issue for now. If someone is interested enough in such a feature, then they could propose changes in that direction at some later point.

  3. Thomas De Schampheleire

    Quickfix solution present. Real setting would be great, but needs an interested person to make it happen.

  4. Log in to comment