Drupal 5, Views and a list of users with membership in user role "x"

Events happening in the community are now at Drupal community events on www.drupal.org.
Posted by kyle.skrinak on July 6, 2009 at 8:24pm

I'm sure I'm missing something painfully obvious. I wish to produce a list of users who have been assigned user role "x" but I'm not seeing how to do so in Drupal 5 and Views

Context:
Drupal 5.18
PHP 5.2.6
MySQL 4.1.19
Views 5.x-1.6

I'd love any pointers -- thanks!

Categories: , , ,

Comments

Views doesn't do users in Drupal 5

Posted by knieveltech on July 6, 2009 at 8:42pm

I believe you will need to query the database directly to get the information you're after.

If you know the role id for the role you're after this should work:
db_query('select u.uid,u.name from users as u left join users_roles as ur on u.uid = ur.uid where ur.rid = %d',$rid);

Much thanks

Posted by kyle.skrinak on July 7, 2009 at 2:53pm

Now to brush up on my php.

triDUG

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

AltStyle によって変換されたページ (->オリジナル) /