User roles token for filtering queries??

Topics: Core, General
Jul 25, 2012 at 2:44 PM

Hi to all,

I was wondering if its possible to have the user's roles as a user token for filtering queries ??....

I could be single string of comma separated roles (Ej. "Administrator, Role 1, Role 2...") of the current user... that way if would be possible to create projection based on the current user roles... 

I don't if it could be added? I've to program it? how can it be done?

Other alternative could be add a text field to the user content type.. but again how can I access that field while creating the filter on the query?






Jul 26, 2012 at 1:51 PM

It could certainly be added by a module that you could build. Tokens are meant to be extended and this information is easy to obtain.