Roles Reader API for 1.8

Warning: This plugin has't been updated in over 54 years. It may no longer be maintained.

What you can do to help:

Provides an API to query user roles (does not provide them)

Last updated

Using this plugin will require custom programming. It provides only an API to read and cache a user's role(s) in session, where the roles are provided from Drupal, LimeSurvey, or custom provider classes you create.

Roles are available as an array or as a semicolon-separated string. E.g.

Array format: array(    '__GLOBAL__' => array('admin', 'role1', 'role2'),    'elgg' => array('admin'),    'drupal' => array('role1', 'role2'),)

String form: "admin;role1;role2;elgg:admin;drupal:role1;drupal:role2"

This allows you to search for roles within a specific provider, or from any provider.

Roles are fetched from RoleProvider objects which return an array of roles from a username. By default the Elgg role provider is added, which isn't very exciting (Elgg currently offers only one role: "admin"), but by creating your own classes you could build roles based on any set of conditions.

Also included are classes for fetching roles from Drupal and Limesurvey, and the username mutch match Elgg's in both systems.

Project Info


  • Category: User admin
  • License: Modified BSD license
  • Updated: 1970-1-1
  • Downloads: 878
  • Recommendations: 3

Other Projects

View Steve Clay's plugins