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.
I have recently added this module and started to see this issue, it could be not related to User Protect, but I need to start somewhere.
Problem: As admin, I got to edit a newly added user and all the data if there, username, first and last name, but no email address is populated into the e-mail form field.
I checked the database, and happy to see that it is indeed saved in the user table. Just not loading in to the user edit form. Any ideas or test I could do to find where this trouble is originating - much thanks!
See image
Comment | File | Size | Author |
---|---|---|---|
no-email.png | 65.82 KB | goose2000 |
Comments
Comment #2
MegaChriz CreditAttribution: MegaChriz as a volunteer commentedI don't think userprotect has anything to do with it. Userprotect only disables fields, not emptying them.
To get a list of possible modules that are emptying the email field, search in the code for
form_user_profile_form_alter
or check it with the following code (this could for example be checked with the "Execute PHP Code" page from the devel module):This will ask Drupal which modules are modifying the account edit form.
If this doesn't help, search instead for
Implements hook_form_alter()
or check it with the following code:This will ask Drupal which modules are modifying forms unspecific.
For both hooks, userprotect will be on the list.
Also check the form in an other browser, in case the browser tries to autofill fields or something.
I hope this helps you further. Reopen this issue if you find out that this issue has something to do with userprotect.
Comment #3
goose2000 CreditAttribution: goose2000 commentedthat is very helpful - I agree, this is not caused by userprotect, see that now.
Comment #4
MegaChriz CreditAttribution: MegaChriz as a volunteer commentedGreat I could be of help :)