Issue #314: Email when user registers
Reported by: | zwarmapapa |
State: | closed |
Created on: | 2018-04-02 13:04 |
Updated on: | 2018-04-03 13:41 |
Description
Is there a way to prevent admins from receiving an email whenever a user registers?
It's getting a bit spammy.
Attachments
Comments
Comment by Thomas De Schampheleire, on 2018-04-02 17:59
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
Comment by zwarmapapa, on 2018-04-03 10:13
Oh thanks for letting me know!
Comment by Thomas De Schampheleire, on 2018-04-03 13:40
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.
Comment by Thomas De Schampheleire, on 2018-04-03 13:41
Quickfix solution present. Real setting would be great, but needs an interested person to make it happen.