You are here

function _linkit_get_associated_roles in Linkit 7.2

Get all roles that is associated to profiles and make an array of them.

Parameters

object The profile object.:

1 call to _linkit_get_associated_roles()
_linkit_build_role_associate_form_fields in plugins/export_ui/linkit_profiles.inc
Append role form elements to the settings form.

File

plugins/export_ui/linkit_profiles.inc, line 324

Code

function _linkit_get_associated_roles($profile) {
  $profiles = linkit_profile_load_all();

  // Unset the profile being edited.
  unset($profiles[$profile->name]);
  $roles = array();
  foreach ($profiles as $profile) {
    foreach ($profile->role_rids as $rid => $value) {
      $role = user_role_load($rid);
      $roles[$rid] = $profile->admin_title;
    }
  }
  return $roles;
}