Hi my friend, there is a problem in the latest version (RC3) with users having assigned more than one role. At line #46 of template.php you are getting (why?) the last element of the roles array:
$role = end(array_keys($user->roles));
in order to get the custom icons, but if the user has several roles (pretty common) the last one is not necesarily the one I've selected in the RootCandy admin. Perhaps you need to transverse the array instead.
Also, in the previous line you modified now the usage of the #1 user:
if ($user->uid != 1) {....
so I turned crazy the whole day trying to guess why my pre-RC-3 working menu didn't now :), I don't get why you're excluding the "super user" from the game, is just a regular user, able to have assigned roles, etc.
Let me know if can help you to work out this issue, I can create you an user in my site in order to test whatever you need there,
Best regards,
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | rc_role_weights.patch | 2.03 KB | sign |
Comments
Comment #1
Takafumi commentedI think that it's by design for simplifying processing. Probably, more complicated processing is needed in order to support multiple role.
However, it may be more useful. You may write the code for implementing that feature and submit a patch.
Comment #2
sfranchi commentedI use to submit patches when the author is not working in the same issue, as soon as the author answer me, I'll submit a patch if needed, don't worry, and is not complicated at all.
Thanks.
Comment #3
sign commented@sfranchi: go for it, i am overloaded now... :S
Comment #4
sfranchi commentedOk, as soon as I get it tested I'll post a patch.
Comment #5
sign commented@sfranchi any progress on this?
Comment #6
sfranchi commentedI'm really sorry but I had no time for this yet, during the next week I'll be working on the site wich has users multiple roles and will try to find an "elegant" solution for this.
Best regards, Sandro.
Comment #7
flebas commentedI think that an elegant solution could use role weights.
Regards,
Frederic
Comment #8
sfranchi commentedYes, I think so too.
Comment #9
Maitreya commentedI really enjoy this theme as a admin.
However i would like to see my users have acces to the icon-bar (it's gorgeous).
Could it be simplified by using this module -> http://drupal.org/project/menu_per_role
for role weighing and maybe attaching icons to menu items?
Comment #10
sfranchi commentedSure, it should work, but have to be tried in order to see if that module is able to process the visibility of the menu items prior to be used by this theme.
Comment #11
sign commented@Maitreya @sfranchi - after reading what menu_per_role does I came to conclusion that it should work with rootcandy
btw sfranchi have you had chance to work out something? if not i'll take over.
thanks
Comment #12
sign commentedfirst draft
not finished, but works...
new settings in theme-settings - role weight
Comment #13
sign commentedcommitted to dev version