Closed (fixed)
Project:
Views (for Drupal 7)
Version:
7.x-3.x-dev
Component:
user data
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Jun 2010 at 21:37 UTC
Updated:
29 Sep 2010 at 05:17 UTC
Jump to comment: Most recent file
Comments
Comment #1
merlinofchaos commentedAssigning so I can find this again.
Comment #2
avpadernoThis is the patch for Views 6.x-2.x.
Comment #3
avpadernoThese are the patch for the other development snapshots.
The patches simply fix the typo.
Comment #4
merlinofchaos commentedCommitted to all branches. Thanks!
Comment #6
CalebD commentedAfter updating to the latest version of views I was having an issue where some views acted as if they were empty. After some debugging, I traced it back to the code change implemented by this bug fix. I don't think the fix here is entirely correct. The bug fix actually causes views to wipe out the user roles of the global user object.
$account->rolesshould only be initialized if it doesn't already exist. Sometimes$accountis a reference to the global user object, which will already have its roles populated.The roles array structure is incorrect. The current code just ads the role ID to the array, but the proper structure is to use the role ID as the array key and the role name as the value.
Attached are two patches against 7.x-3.x-dev and 6.x-3.x-dev.
Note the original poster actually points this out:
Comment #7
dawehnerStuff like this is always aready reported :) See #832954-32: global $user->roles get changed by argument_user_validate
Thanks for writing a patch.