Log in


  • Category: Third Party integrations
  • License: GNU General Public License (GPL) version 2
  • Updated: 2012-3-10
  • Downloads: 1806
  • Recommendations: 9


Previous releases:

Other Projects

View Arck Interactive's plugins

Roles for Profile Manager for Elgg 1.8

Integration between roles framework and profile_manager

Last updated 765 days ago

This project integrates Roles Framework (by Arck Interactive) with Profile Manager (by ColdTrick).

Once enabled, this plugin will create an initial set of Profile Types associated with each custom role. Further editing can be done via profile manager's admin interface.

Roles are automatically updated on profile type change, and vice versa role change trigger a profile type change.

Release Notes:

system messages fixed


  • Dilbert Dilweg 765 days ago

    Thank you for fixing the system message issue so quickly :)

  • Jeroen Dalsem 765 days ago

    Good to see something like this being developed. It was always one of the things we had in our mind when developing the profile type mechanisme. If you have any thoughts on how can we can improve this integration or if you ran into some issues regarding the profile manager, just let me know.

  • TahoeBilly 758 days ago

    In simple terms, the profile types can be set to have a different set of roles for each one?

  • rjcalifornia 758 days ago

    Good question TahoeBilly. Will recommend it and try it tomorrow! Nite!

  • Ismayil Kharedinov 757 days ago

    @TahoeBilly, in simple terms, a given role is associated with a given profile type, i.e. one role per profile type, mutually dependent, a change in one triggers a change in the other. This basically allows you to define different profile fields for different roles.

  • TahoeBilly 757 days ago

    In our case we have 3 profile/member types to start-

    #1 Type we only want to be able to make comments to photo albums and also to not be able to view much of the network, meaning groups and other areas are hidden from them.

    #2 Type we want to be able to use groups but not own groups but not own them and we don't want them using "files" plugin. We want to limit which plugins they can use.

    #3 Type we want to be able to be group admin groups, invite other group admins from off the system, give the other group admins various group "roles" i.e. manage a blog, or discussions.

    Can profile manager and the various roles plugins handle all this, of am I setting out a much complex set of customizing?


  • Ismayil Kharedinov 757 days ago

    The simple answer is yes. That's exactly the purpose behind the 'roles' framework. This particular plugin just bridges roles with profile types, allowing each role to have a distinct set of fields in their profile.

  • oleksis.fraga 757 days ago

    THANKS! where is the love #black #white #peace #love

  • TahoeBilly 756 days ago

    Please I need advice on how to transfer the settings from one install to another. I need to move the entire package of Profille Manager; fields, user types, categories and roles, if that makes sense.

  • Jylocasin 666 days ago

    Thanks to ark. Could it be possible to obtain from some one (not necessary ark) a little tuto with exemples. I am a little bit disappointed with the conf of this plugin.


  • rjcalifornia 666 days ago

    Check the pdf documentation and take a look at the other roles Arck released. 

  • lim 557 days ago

    Hello in 1.8.8 there is an error that said  something like "The configuration variable cannot exceed 32 characters". I found a fix, which is to shorten your function name roles_pm_create_profile_types_from_roles into something like roles_pm_create_pt_from_roles.

  • uniopp 521 days ago

    How and where do I add different roles?

  • This Script Lover 463 days ago

    ok everyone Im trying to use role in conditional statement, like if user has role = RoleName { than do this....

    Right now I'm just trying to echo the role ( as described in the pdf doc file) but no role is showing. I have profile manager installed and all roles are created as it created those categories in PM.

    Here is my code:

    $user = elgg_get_logged_in_user_entity();
    $user_guid = $user->getGUID();

    //$myrole = roles_get_role($user = null);
    //$myrole = roles_get_role($user);

    $myrole = roles_get_role();

    echo 'Role:' . $myrole . '';

    anyone knows how to get this to show?


  • This Script Lover 462 days ago

    can anyone shed some light here?

    Roles plugin gurus?


  • Andras Szepeshazi 462 days ago

    @This Script Lover: roles_get_role() will return you an ElggRole object, note a string, so you won't be able to just 'echo' it. Use 'echo $my_role->name' to get the name of current user's role. Or use print_r($my_role) to see the whole object.

  • This Script Lover 462 days ago

    @ Andras, THANK YOU, that was the piece of puzzle I needed.

  • Melvyn Gómez 422 days ago

    hoy i can call a function to add or update a role for example called "Student" with this plugin, which function i need to use?

  • This Script Lover 344 days ago

    OK guys How do one go about getting a list of users with specific role?

    I'm trying this but it's not working:

    $options = array('type' => 'user', 'full_view' => false, 'relationship' => 'has_role', 'role_name' => 'default', 'relationship_guid' => $user->guid,); $content = elgg_list_entities_from_relationship($options);

     I looked in the doc file but nothing there. What's the correct way to get list of users with specific role ?


  • Andras Szepeshazi 343 days ago

    @Script Lover:

    First obtain the role object from the name via $role = roles_get_role_by_name($role_name) - see lib/roles.php for reference. This should return an ElggObject, assuming you passed a valid role name. Once you get the role object, use its guid in your relationship query.

    $options = array(
     'type' => 'user',
     'relationship => 'has_role',
     'relationship_guid' => $role->guid,
     'inverse_relationship' => true,
     'limit' => 0

    That should do it. Please note that users who do not have a specific, custom role (i.e. regular members and admins without other roles) will not be returned by this query. This was a deliberate design decision and serves efficiency, so the relationship table won't be filled with arbitrary role information. For getting all regular members having the DEFAULT_ROLE role, you'd need to construct a custom query on the users table, selecting all non-admin users, then LEFT JOIN the relationships table to fetch all users who do not have role specific relationships.

  • This Script Lover 343 days ago

    @Andras, Once again saving the day :)

    I did see bits and pieces in classes ElggRole.php and lib/roles.php but could not put 2&2 together.

    My role name is "super" so for getting role object do I use $role = roles_get_role_by_name(super)? or does it need to be in quotes :$role = roles_get_role_by_name('super')?

    I'll play with that but wanted to confirm the correct way.

    Thanks a lot.

  • This Script Lover 343 days ago

    That worked perfectly, Thank you very much.

    Now if you know a way, I need to get another user list that excludes users with that role. Basically list all users that do NOT have this specific role.


  • DhrupDeScoop 343 days ago

     * To ask for entities that do not have a particulat relationship to an entity,
     * use a custom where clause like the following:
     *     $options['wheres'][] = "NOT EXISTS (

  • This Script Lover 343 days ago

    Hey DDS :)

    So there is no special way in Elgg to exclude parametar from array like: 

    $options = array(
     'type' => 'user',
    'exclude' => 'has_role',

    I guess I'll try tinkering with "wheres' NOT EXISTS

    Thank you.