0

Currently on the user administration page admin/people there is a link below the tab row that lets admins add users (links to admin/people/create). Instead I would like to place that link in an additional tab next to the tabs "list" and "permissions". Has anybody experience in this? Or is there even a module for this?

I currently have difficulties finding anything because "add user tab" are quite generic search terms and there is a lot to find – but not meeting my problem.

thank you!

0

I think what you're asking is the same as this. Apologies if not.

Here I've added a menu item that links out to another page. So you should be able to change the links to your needs. For this I created a module 'taskmenuextras'

    **
* Implementation of hook_menu_alter
*/
function taskmenuextras_menu_alter(&$items) {
    $items['user/%user/featuredjobs'] = array(
        'title' => t('Featured Jobs'),
        'page callback' => 'taskmenuextras_redirect_nodequeue',
        'access callback' => 'taskmenuextras_user_has_role',
        'access arguments' => array(1, array('admin')),
        'type' => MENU_LOCAL_TASK, 
        'weight'  => 0,
        ); 


    return $items;
}


function taskmenuextras_redirect_nodequeue() {
  drupal_goto('admin/structure/nodequeue/featured_jobs/view/1');
}

function taskmenuextras_user_has_role($user, $roles = array()) {  
  foreach ($roles as $role) {
    if (in_array($role, $user->roles)) {
      return TRUE;
    }
  }
  return FALSE;  
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.