Hi,

Hi thanks for a great module. It really is a god send for us at Plus (www.plusgroups.org.uk).
However, when I create a new user and add that user to a role that has mandatory groups (usually 1 role with 3 groups but can be upto 8 groups for a single role and the number of roles someone can have could be upto 15, but I haven't tried that yet.) Anyway, when I create a user with a single role that has a mandatory group and then put the minimum information in when I click save the system says, created user, subscribed to... but no groups listed. When I reopen and save the user the user is then subscribed to the groups properly.

Hope you can help, and thanks again

Richard

Comments

dwees’s picture

The problem here is the $account variable doesn't seem to contain the user roles during the insert $op. Solution, use $edit instead.

Arround line 1000 change


      if (isset($account->roles)) {
        foreach ($account->roles as $key_r => $value_r) {

to


      if (isset($edit['roles'])) {
        foreach ($edit['roles'] as $key_r => $value_r) {

and everything seems to work as expected.

Dave

richard.e.morton’s picture

is this likely to be in the next point release?

richard.e.morton’s picture

sorry, I forgot to say thanks for your time and effort looking into this.
R

dwees’s picture

I have no idea if it will be included or not, I'm not the module maintainer, just someone else who was having exactly the same issue you were having.

Dave

rconstantine’s picture

Status: Active » Fixed

Didn't have time to repeat the error, but added the change to both branches. Hopefully that doesn't screw anything else up. Let me know if it does.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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