You are here

function role_delegation_delegate_roles_action_submit in Role Delegation 7

File

./role_delegation.module, line 385
This module allows site administrators to grant some roles the authority to change roles assigned to users, without them needing the 'administer access control' permission.

Code

function role_delegation_delegate_roles_action_submit($form, $form_state) {
  $roles_change = array();
  foreach ($form_state['values']['role_change'] as $rid => $value) {
    if ($value > -1) {
      $roles_change[$rid] = $value;
    }
  }
  return array(
    'roles_change' => $roles_change,
  );
}