Closed (fixed)
Project:
External Link Popularity
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Aug 2008 at 06:19 UTC
Updated:
11 Sep 2008 at 07:52 UTC
If you assign roles to track the code fails.
Line 366: $roles_to_track is set to :
Array
(
[1] => 1
[2] => 2
)
[e.g., if you select anon & auth users]
However, $user->roles has the actual name of the role, not the id.
Proposed fix:
foreach ($user->roles as $rid => $role) {
if (in_array($rid, $roles_to_track)) {
return TRUE;
}
}
Add in the $rid and check that since it has the numeric id and not the text value.
Comments
Comment #1
sikjoy commentedFantastic bit of bug squashing!
Thanks m3avrck!
Comment #2
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.