I had some irregularities with proper assigning of the maximum invites allowed to send by role.
After reviewing the code, I found the bug.
In invite_get_role_limit, we compare the names of $account->roles with names of the results user_roles().
As long as we use only English, this is not a problem. Although the version with $role_no_space is not very nice.
But when we use another language than English, we compare the translated role-names of $account-roles with the untranslated ones of user_roles().
My suggestion: let's use the roles id's instead of the names.
I tried to change every position where the names were used to the id-using behaviour.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | invite-role_ids.patch | 5.09 KB | smk-ka |
| invite_admin.inc_.patch | 1.99 KB | guldi | |
| invite.module.patch | 1.6 KB | guldi |
Comments
Comment #1
guldi commentedCould someone please have a look at this?
Comment #2
smk-ka commentedThis looks good to me except that the default target role setting was lost, so I've put it back in.
All we need now is an update function that performs the role names to rid conversion.
Comment #3
guldi commentedThis should be it.
Would be glad if you could check it...
Comment #4
guldi commentedwhat's the state here??
Comment #5
andypostSame patch :) but with upgrade path
http://drupal.org/node/322748#comment-1850916