Is there a way to not track "Admin" role??? Otherwise, this module always ranks Admin way above anyone else...

Comments

Witch’s picture

subscribe

Ivo.Radulovski’s picture

yes and when there is an editor team...the editor teams is always on the top 5, then its worthless for the normal users.

Witch’s picture

Yes, this is exactly the problem we have!

Ivo.Radulovski’s picture

is this a support request or more a bug?

Witch’s picture

its a support request.

avpaderno’s picture

It could also be a feature request. If you open a support request, then it's probable the current maintainer will simply reply to you question, and not change the code, if such feature is not present.

The code implemented by the module doesn't allow you to filter the users the module consider by role.

avpaderno’s picture

Title: Tracking User activity by role » Tracking user activity by role
Category: support » feature
bethhauck’s picture

I'm using a theme function to filter out high level users, based on whether they have "administer nodes" permission:

function mytheme_user_activity_list($users, $title = NULL) {
  if (!empty($users)) {
    foreach ($users as $user) {
      $user_obj = user_load($user->uid);
      if(!user_access('administer nodes',$user_obj)) {
        $items[] = theme('username', $user) . theme('user_activity_o_meter_small', $user->user_activity_index);
      }
    }
  }
  return theme('item_list', $items, $title);
}

You could also limit it to a particular role:

function mytheme_user_activity_list($users, $title = NULL) {
  if (!empty($users)) {
    foreach ($users as $user) {
      $user_obj = user_load($user->uid);
      if (in_array('Subscriber',$user_obj->roles)) {
        $items[] = theme('username', $user) . theme('user_activity_o_meter_small', $user->user_activity_index);
      }
    }
  }
  return theme('item_list', $items, $title);
}

Not ideal, but it might help someone. Just paste it into your theme's template.php file and clear the theme registry.

AndreasST’s picture

Is there a way to exclude specific roles instead of showing the activity for a particular role?

avpaderno’s picture

Version: 6.x-1.1 » 6.x-1.x-dev
Issue summary: View changes
Status: Active » Closed (outdated)

I am closing this issue, which is for a not supported Drupal version.