When I do a "assign user groups", the members are added but my manager gets removed from the group.

Any ideas?

Thanks.

CommentFileSizeAuthor
#2 userplus.module.patch162 bytespanis

Comments

marcp’s picture

Looking at the code, the only way you should be able to have your manager removed is if you remove the user from the group. If you then go and add the same user back in, the user won't be a manager. Userplus doesn't provide a means for you to add group managers at this time.

Is this the scenario you are talking about? If not, please provide reproducible steps.

panis’s picture

StatusFileSize
new162 bytes

in your submit handler userplus_admin_usergroups_submit

     foreach ($groups as $nid => $state) {
        if ($state == 0) {

The group managers checkboxes in the form are disabled - disabled in FF and in IE means that the state for these checkboxes does not get returned - this is per standard specs.

So $state ends up being 0 for these users on the submit which deletes them..

You will have to remember somehow that these are the group admins and not delete them in the submit function. See attached patch for one possible solution.

Hope this helps.

marcp’s picture

Component: Miscellaneous » Code
Assigned: Unassigned » marcp
Category: support » bug

Thanks for the help on this one. I checked in a fix to the Dev version. Anyone care to test it out for me? I'll create a new release if this bug is fixed.

panis’s picture

I have been using the patch on a live system for the last few weeks - and haven't seen any problems so far.

fgjohnson@lojoh.ca’s picture

Component: Code » Miscellaneous

Any word on a full patch for this?
The issue goes beyond just losing the group admin.

If group membership is configured to require approval.
-2 things happen when users are selected as members of the group.

1) The admin of the group losses rights - (site administrators can reassign a manager from the email tab) - yuk

2) Users assigned to a group in userplus can "view" book pages assigned an audience of that group BUT but recieve the following error trying to edit the content. "You must join a group before posting a Book." When they go to the Joun a group link they are already a member of the correct group.

Hope this helps.
Grant

fgjohnson@lojoh.ca’s picture

This was a duplicate post. Sorry

marcp’s picture

@fgjohnson - please try the 5.x-1.x-dev version that's available on http://drupal.org/project/userplus and let me know if that fixes it for you. I'd like to wait to cut a release until someone in the community has tested it out.

@panis - i used your patch as a guide but solved it differently, so if you're able to test out the new dev version that would be helpful.

thanks,

marc

marcp’s picture

Please try out the latest 5.x-1.2 release and provide feedback here.

bonobo’s picture

Status: Active » Fixed

Setting to fixed due to inactivity, and this has been addressed in recent releases.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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