Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
seems to me that it would make sense for the checkbox to be checked by default when registration_role is going to assign a role to the user being created. Right now the checkbox is still blank, even in cases where the role does get assigned. So it's a bit confusing as a user.
Comments
Comment #1
WebSinPat CreditAttribution: WebSinPat commentedI was able to get the behavior I wanted (as described above) by totally hacking the module ;)
I changed the hook_form_FORM_ID_alter function to this (and was able to get rid of the _submit function altogether):
So I moved the role assignment to the user form creation rather than form submit.
Not sure if there's any disadvantage to my method or any reason not to do it this way, but it seems to work for what I want to do.
Comment #2
WebSinPat CreditAttribution: WebSinPat commentedComment #3
mlncn CreditAttribution: mlncn commentedThanks WebSinPat!
I'm not using this module currently, so i really should defer to you, but are your changes geared for the administrator adding new users? Does it still work for regular users self-registering? (If i recall correctly, they don't see any checkbox at all.)
Comment #4
mlncn CreditAttribution: mlncn at Agaric for Drutopia, Cambridge, Massachusetts Family Policy Council, Find It Cambridge commented