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.
Right now, if any role is selected to be automatically assigned, it gets assigned both when the user registers themselves, and also when the admin is creating the new user.
As a result, there is an inconsistency: the admin's new user form has the list of roles that the admin can select, and there is no warning that extra roles will be added because of this module.
A patch is proposed that adds 2 options on the module functionality: Add the selected roles only on user registration form, or both on user reg. form and on admin user creation.
Comment | File | Size | Author |
---|---|---|---|
#4 | 404318-4.patch | 3.19 KB | efpapado |
Comments
Comment #1
tbartels CreditAttribution: tbartels commentednew version of the admin_default method, the first one has a flaw in the logic due to operation order
Comment #2
mlncn CreditAttribution: mlncn commentedWow i have been a horrible maintainer. I wish these issues would have shown up in http://drupal.org/project/issues/user (without my leaving a comment like this) and maybe this wouldn't have gone 2 years without my noticing.
The patch looks like it would replace existing default values when an administrator edits a user page. An array_merge() here?
Comment #3
DuaelFrThis version of Registration role is not supported anymore. The issue is closed for this reason.
Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.
This issue has been automagically closed by a script.
Comment #4
efpapado CreditAttribution: efpapado at Ramsalt Lab commentedReopening this issue, and proposing a patch that offers this feature for the D8 version of the module.
I also update the description.
Comment #5
karthikeyan-manivasagam CreditAttribution: karthikeyan-manivasagam as a volunteer commentedHi efpapado,
Thanks for your contribution, patch should support the Drupal 8 version to commit, variable_get is deprecated in D8.
Comment #6
efpapado CreditAttribution: efpapado at Ramsalt Lab commentedHmm, my patch does not use
variable_get
Comment #8
karthikeyan-manivasagam CreditAttribution: karthikeyan-manivasagam as a volunteer commentedOh Sorry, Fixed, thank you !
Comment #10
xxdarii CreditAttribution: xxdarii commentedHello. I've tried the patch and it doesn't seem to work. When I've chosen User self registration mode and a preferred rolo, on a new registration it doesn't add the role to new user.