Active
Project:
Views (for Drupal 7)
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
12 Mar 2013 at 03:29 UTC
Updated:
12 Mar 2013 at 03:29 UTC
I'm not sure if there are many others who would like this, but I am looking for a default argument "User roles from logged in user" similar to existing "User ID from logged in user".
I have a "notice" content type with a role field "audience" so administrators can post notices to either users with the "staff" or "customer" role. I didn't want to go down the content_access route so I'm just using a view argument to filter the results.
Currently using a PHP argument.
$account = $GLOBALS['user'];
return implode('+', array_keys($account->roles));Like I said, not sure if there is a big enough need for this feature, so if not at least here is a reference to my example PHP argument.