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.
Problem/Motivation
In my use case, after a user registers, their user data is sent via an event to another application. We use Logintoboggan to set an "unverified user" role that is needed by the event consumer. However, when logintoboggan modifies the $form_state variable, it does not set the validating role's name.
Proposed resolution
In logintoboggan_user_register_submit, logintoboggan set the role name to "1". We should retrieve the role name and set it to that. Right now, I can use the role ID, but I want to avoid that as the ID can change across different installations of Drupal.
I've attached a patch that makes this change.
Comment | File | Size | Author |
---|---|---|---|
#5 | logintoboggan-registerRoleName-7.x-1.x-dev.patch | 897 bytes | kmorozov |
Comments
Comment #2
kmorozov CreditAttribution: kmorozov commentedComment #3
kmorozov CreditAttribution: kmorozov commentedComment #4
kmorozov CreditAttribution: kmorozov commentedComment #5
kmorozov CreditAttribution: kmorozov commented