By drupalninja99 on
How do I add profile fields to the main account settings page under my account..edit? I am adding a few admin fields that only I adjust for users and I want to add the fields to the main account settings page. Right now if I add a category basically all the user sees is a blank page when they click on that tab which is stupid bc I don't want them to see anything.
Comments
I searched Google for the
I searched Google for the same issue and got this topic. Horray, I thought. But no answer... I found the solution elsewhere on the site though:
In profile.module, in function profile_field_form_validate, comment out the following 3 lines:
And in function profile_form_profile, change the following line:
Hope it helps someone else.
But now the create new user field is broken
After implementing the code above, when I attempt to create a new user, it doesn't give me the form fields for username or email address and when it attempts to validate on those fields when submitted...I get an error. Workaround?
don't display new profile field in registration form
is the work around that i discovered :) oh well.
This worked for me, and I'm
This worked for me, and I'm using 5.
At http://drupal.org/handbook/modules/profile
**********************************************************
I was looking for the same
jim_at_miramontes - February 16, 2007 - 19:49
I was looking for the same ability in Drupal 4.7 (you're working in 5, right?). I brought the logic of your patch into 4.7, and it seems to work properly EXCEPT that I had to patch a line in user_register to use array_merge_recursive instead of array_merge:
if ($extra) {
$form['account'] = array('#type' => 'fieldset', '#title' => t('Account information'));
$form['account']['name'] = $form['name'];
$form['account']['mail'] = $form['mail'];
$form['account']['pass'] = $form['pass'];
$form['account']['notify'] = $form['notify'];
unset($form['name'], $form['mail'], $form['pass'], $form['notify']);
$form = array_merge_recursive($form, $extra);
}
Otherwise, the account values in $extra clobber those in $form: you lose name, mail, pass, and notify. Other than that, it seems to work fine.