Not working with profile module
sign - October 16, 2007 - 08:47
| Project: | Email Registration |
| Version: | 5.x-1.3 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | sign |
| Status: | closed |
Description
When profile.module is enabled, it won't hide username input field from registration form.
That's because profile module will change the array of form to $form[category_name]['name'] instead of just $form['name'].
| Attachment | Size |
|---|---|
| email_registration_profile_fix.patch | 1.43 KB |

#1
actually it applies only in user_register form.
#2
applied this patch http://drupal.org/node/183820
This seems like a sane way to fix the bug. module_exists() checks if the profile module is installed (of course, it's core) AND enabled which is that bit I was not sure on.
Thanks for the patch, sorry it took so long it'll be available in 5.x dev snapshot and next stable release.
#3
Automatically closed -- issue fixed for two weeks with no activity.
#4
#1 works for me. I know the issue is closed, but just another bit of positive feedback ;) thanks!
#5
Thanks for the feedback Scott.
I am opening this issue back up because the same thing is happening with nodeprofile.module I just discovered.
I will apply the patch and commit it soon.
#6
I have the profile module and the latest version (I checked it has the patch). But the username field keeps showing!
#7
Let me clarify a bit:
It works fine on the login page. But the registration page keeps showing username whenever profile is enabled.
I am working on Drupal 5.7.
#8
Hi, I also have this problem with nodeprofile.module, has anyone fixed this yet? Thanks!
#9
Rather than checking for a specific module, it seems to be much safer to just check for the existence of the $form['name'] and $form['account'] variables. Generalizing the code like this will ensure email_registration will work for profile, node profile, or any other module that alters the sign up form (including custom modules). This will also solve the problem of someone having node profile installed, but not configured to alter the sign up form.
<?phpswitch ($form_id) {
case 'user_register':
if ((!isset($form['name'])) && (isset($form['account']))) {
?>
BTW - This my first code patch submission... so please be kind if I beefed it up. Thx.
#10
#11
faction, thanks. Your patch did not work but that's ok. 1 liner.
I'm committing this to HEAD please confirm that it's working.
#12
Looks like this issue has been resolved a while ago.
#13