Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
By CharlieCastle on
Hi,
I need authorized users to have a specific role so that I can use the rules module to perform actions.
For example, I want to send emails to authorized users when someone adds content. But allow users to opt out of those emails.
Ideally, I'd like to include a checkbox for this in the users profile.
But if that's not possible than to automatically assign him to a role when he becomes an authorized user. In that case I'd have to manually remove him from that role if he wants to opt out.
Is this at all possible? How?
Comments
Why not add a checkbox field
Why not add a checkbox field to the use object (Under account settings >> manage fields) labeled something like "Subscribe to ...." with the default being checked. They can then simply check/uncheck the value by editing their account.
Thanks, that's what I had in
Thanks, that's what I had in mind but need a way to establish the roles automatically at first.
That's where vaibhavjain's suggestion should do the trick.
Thanks,
CC
I believe, this module should
I believe, this module should do the trick - http://drupal.org/project/autoassignrole
It will allow you to assign a role as soon as a user registers, and allow them to opt put that role.
Hope that helps!!!
Vaibhav Jain
I think that's exactly what I
I think that's exactly what I was looking for.
Thanks!