Hello

There is a bug that happened in 2.2 and is still present in 2.3

When an admin tries to edit another user groups or interests, the information is not updated.

Kind of in a rush right now, just stopped by to let you know.

Cheers

Comments

jm.federico’s picture

Title: Admins cante edit other users interest groups » Admins can't edit other users settings, it updates admins account instead

Right

Some more info, this is the deal:

If I can edit other user mailchimp settings, once I press "save settings" it actually updates my own settings and not the settings for the user I'm editing.

The problem is in mailchimp_auth_newsletter_form() that overrides the value set for $form['uid'] in mailchimp_subscribe_auth_form().

And the guilty guy is the array_merge() in line 234 in mailchimp.module

Cheers

jm.federico’s picture

A solution would be to move

    if ($account->uid) {
      $form['uid'] = array(
        '#type' => 'hidden',
        '#value' => $account->uid
      );
    }
    else {
      // user registration or admin creating new user
      $account->roles = array(2 => 'authenticated');
    }

in mailchimp_subscribe_auth_form() to after the call to mailchimp_auth_newsletter_form()

Cheers

levelos’s picture

Status: Active » Fixed

Thanks for catching that jm.federico. I took a slightly different approach, and updated the status messages to ensure the right accounts are being updated, http://drupal.org/cvs?commit=470428. I really need to work on some unit tests, regression testing is killing me!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.