Error in User Edit form Have searched a lot for this issue. I am not sure if it is a php issue or Drupal issue but the error message is pointing towards Drupal. Whenever i go to the user edit form in Drupal 7 i get the following error:

Notice: Undefined index: #title in user_account_form() (line 1070 of /opt/lampp/htdocs/modules/user/user.module)

I have searched a lot. This seemed relevant http://drupal.org/node/1088964 but it did not work out for me. Any suggestions would be appreciated.

Thanks

Edit 1: I am using 7.18 and yes i have done some changes in user registration form...i have commented the lines in bold and added a placeholder. Now when i uncomment them then no error occurs but then in my user registration form those fields show up...let me clear this through 2 images...1st image shows the case when i commented the lines(in bold) and added a placeholder (this is what i want it to look like): 


However this gives me the error in user edit form. Now when i uncomment, it looks like


I do not want the labels Username and password to show up there. How can i achieve this without that error bugging me. The line number 1070 is inside user_account_form as well. I have realized the error is because i have commented out and it is looking for a title field or password field but then my registration form looses its appearance as i want. Is there a way round to do this.

function user_account_form(&amp;$form, &amp;$form_state) {
      global $user;

      $account = $form['#user'];
      $register = ($form['#user']-&gt;uid &gt; 0 ? FALSE : TRUE);

      $admin = user_access('administer users');

      $form['#validate'][] = 'user_account_form_validate';

      // Account information.
      $form['account'] = array(
        '#type'   =&gt; 'container',
        '#weight' =&gt; -10,
      );
      // Only show name field on registration form or user can change own username.
      $form['account']['name'] = array(
        '#type' =&gt; 'textfield',
        **//'#title' =&gt; t('Username'),**
        '#maxlength' =&gt; USERNAME_MAX_LENGTH,
        //'#description' =&gt; t('Spaces are allowed; punctuation is not allowed except for periods, hyphens, apostrophes, and underscores.'),
        '#required' =&gt; TRUE,
        **'#attributes' =&gt; array('class' =&gt; array('username'), 'placeholder'=&gt;t('Username')),**
        '#default_value' =&gt; (!$register ? $account-&gt;name : ''),
        '#access' =&gt; ($register || ($user-&gt;uid == $account-&gt;uid &amp;&amp; user_access('change own username')) || $admin),
        '#weight' =&gt; -10,
      );

      $form['account']['mail'] = array(
        '#type' =&gt; 'textfield',
       **'#title' =&gt; t(' Email Id'),**
        '#maxlength' =&gt; EMAIL_MAX_LENGTH,
       // '#description' =&gt; t('A valid e-mail address. All e-mails from the system will be sent to this address. The e-mail address is not made public and will only be used if you wish to receive a new password or wish to receive certain news or notifications by e-mail.'),
        '#required' =&gt; TRUE,
        '#default_value' =&gt; (!$register ? $account-&gt;mail : ''),
        **'#attributes' =&gt; array('placeholder' =&gt; t ('E-mail')),**
      );


The lines where the error points to :

if (!$pass_reset) {
      $protected_values['mail'] = $form['account']['mail']['#title'];
      $protected_values['pass'] = t('Password');
You shouldn't be modifying any core files. Removing a declaration for a value that needs to be used elsewhere is causing your problem, and the solution is to make your changes using hooks and templates in custom modules and themes, which are Drupal's way of allowing users to modify behavior and output. 

This thread contains discussion of theming the user edit page, and has links to helpful information.