This is the case.

Users may see others users details. This is available when user click on another user to view their details.
And users activity available via "track" tab to see what have been posted by particular user.
This is ok only if this happens among same level of users.

In my case. Authenticate users may view and track admin or even root details. This is not nice.
How to prevent this.

Regards

Comments

pramudya81’s picture

Your help would be appreciated.

digitalfreak’s picture

go to YourSite.com/admin/user/access

uncheck the boxes for your user's role in statistics module

pramudya81’s picture

By doing your suggestion above. The track tab would then be unavailable at all.

I still want it there when authenticated user viewing other authenticated user. Or admin viewing authenticated user.
But not authenticated user viewing admin's tracks.

I managed to do this by modifying the TRACKER module on function tracker_track_user()

Just disable the track tab when authenticated user viewing user account 1 (i.e root) accounts.

And I hard coded some other admin accounts value.

No other options I guess. Any better solution?

Regards

vm’s picture

The best suggestion and implementation woudl be to write a patch that patches the module and allows tracker to be set by role permissions in adminster -> permissions

This would be both beneficial to you and the community at large, as if you get the patch in core then you won't have to make these changes every time you update/upgrade drupal core.

edit there is already a patch here: http://drupal.org/node/31292 for drupal 7.x which needs testing and feedback.

pramudya81’s picture

Good link you gave. I'll try to look at this.

Regards

esraaCPE’s picture

using hook_menu_alter(&$items) {
$items['user/%user/track'] ['access callback' ] = '_hook_user_access';
$items['user/%user/track'] ['access arguments' ] = array(1);
}

function _hook_user_access ($account) {
global $user;
return user_view_access($account) && user_access('access content') && ($user->uid == $account->uid) ;
}

I have used this solution and it works fine

dipu183’s picture

Hi,

You may disable appearing of Tracker tab on the user profile by editing the tracker.module. Search for
function tracker_menu($may_cache) {
and below that edit the code as described below -

else {
if (arg(0) == 'user' && is_numeric(arg(1))) {
$items[] = array('path' => 'user/'. arg(1) .'/track', 'title' => t('Track'),
'callback' => 'tracker_track_user', 'access' => user_access('access content'),
'type' => MENU_IS_LOCAL_TASK);
$items[] = array('path' => 'user/'. arg(1) .'/track/posts', 'title' => t('Track posts'),
'type' => MENU_DEFAULT_LOCAL_TASK);
}
}

/* return $items; */ /* hashed to disable 'Track' tab on user profile page */
}

Cheers,

merilainen’s picture

This can be achieved by theming. I found solution for Drupal 6 here: http://drupal.org/node/68792#comment-1004484

gaellafond’s picture

You can add 'access tracker' and 'access own tracker' permissions by applying this patch for Drupal 6:
http://drupal.org/node/762962
or this patch for Drupal 5:
http://drupal.org/node/510802

anybody’s picture

Some more information and possible solutions can be found here:
http://julian.pustkuchen.com/en/linktipps/linktipp-drupal-hide-track-pag...

http://www.DROWL.de || Professionelle Drupal Lösungen aus Ostwestfalen-Lippe (OWL)
http://www.webks.de || webks: websolutions kept simple - Webbasierte Lösungen die einfach überzeugen!
http://www.drupal-theming.com || Individuelle Responsive Themes

israel07’s picture

I also searched this issue on google and this tutorial worked for me .... http://www.ehow.com/how_8668376_only-see-track-tab-drupal.html

Hope it helps =)