I've set the "access notify" permissions so that only specific roles should be able to access it. However, I just noticed that when a new user creates an account there is a checkbox there "Receive email notifications of news posted to this site. Notifications are sent every 1 hour." which defaults to on!
So my primary question is how do I make it so that this option doesn't show up on user login at all? That would solve the immediate problem.
A related question would be, is it perhaps a bug that even though I have set permissions such that not all roles can access notify that the new user process allows new users to bypass that permission?
Comments
Comment #1
moondancerjen commentedI'd really like to know how to fix this too. I only wanted notify so our administrators would know when anonymous users post content.
Comment #2
matt2000 commentedTo be clear, the presence of that check box does not in any way override the permission. If a user registers with it checked, but they do not have a role that permits them to receive notifications, then they will not receive notifications.
To prevent the selector from appearing, you can comment out line 126 of notify module as follows:
Comment #3
matt2000 commented[dbl post]
Comment #4
matt2000 commented[dbl post]
Comment #5
matt2000 commented[dbl post -- something must be up with drupal.org's caching or DB replication, cause I swear this didn't seem to post at first.]
Comment #6
matt2000 commentedSince I made such a mess of this thread, I'll atone by offering this patch. It modifies the notify admin settings to allow for the registration check box to be removed.
Comment #7
matt2000 commentedComment #8
flaviovs commented@matt2000, although your patch provides a workaround for people who don't want the checkbox on the reg form, I IMHO think this is not the best way to handle this issue.
Since we already have an 'access notify' permission, there's no need for an additional settings. Just check
user_acess('access notify' )to know if the user should be presented with the checkbox or not.Patch attached.
Comment #9
matt2000 commentedA valid point, but what about the scenario where you want to allow registered users to manage their own settings, but you don't want it as part of the registration process? I.e., all users are added to the list by default, but have the option to opt-out. Is this too rare a scenario to consider?
Comment #10
Michel Poulain commentedHi Matt,
With your last patch, the administrator might force new user to have notification enabled only. I wanted exactly the opposite: I wanted my new users to enable this feature later, on their own will after registration, with notification disabled by default.
Here is a new patch with best of 2 worlds:
- hide/display Notification setting on registration form
- default value for new user : notification enabled or disabled
Mike
Comment #11
matt2000 commentedI like #10. Has anybody tested it?
Comment #12
ishmael-sanchez commentedBefore the patch on a vanilla install:
check box appears registration form
'Enabled' by default
After patch:
check box still appeared on registration form
'Enabled' still set by default
Comment #13
matt2000 commentedSo the new option to disable it on the admin settings form doesn't work?
Comment #14
ishmael-sanchez commentedOk so upon further investigation:
- hide/display Notification setting on registration form
Works, but is enabled by default
- default value for new user : notification enabled or disabled
Works, but is enabled by default
Comment #15
matt2000 commentedThis doesn't apply cleanly against HEAD or the DRUPAL-6--1 branch. Please reroll, and I will commit. I'd like to do a new release with several fixes in the next couple weeks.
Comment #16
Michel Poulain commentedHi Matt, here is the correction of the patch against your latest dev version.
Comment #17
gpk commentedNeeds review I think..
Comment #18
matt2000 commentedOn further thought, I'm taking back my comment in #9, and using a solution like the one proposed in #8.
The goal in #10 is therefore possible by granting 'access notify' permission to authenticated users, but not anonymous users.
I won't be supporting an option to sign-up users for notifications without giving them notice or opportunity to opt-out.
Comment #19
Michel Poulain commentedMatt2000, with the latest patch, users HAVE opportunity to opt-out : via their "Notification settings" panel and via the footer on each email.
Comment #21
izmeez commentedI have posted a patch in http://drupal.org/node/870812 that includes options to show email notification checkbox on registration without user permission needed and to set default status as desired along with a few other UI changes.