You are here

function _og_role_watchdog_history_rows in Role Watchdog 7

Same name and namespace in other branches
  1. 6.2 modules/og_role_watchdog/og_role_watchdog.pages.inc \_og_role_watchdog_history_rows()
  2. 6 modules/og_role_watchdog/og_role_watchdog.pages.inc \_og_role_watchdog_history_rows()
  3. 7.2 modules/og_role_watchdog/og_role_watchdog.pages.inc \_og_role_watchdog_history_rows()

File

modules/og_role_watchdog/og_role_watchdog.pages.inc, line 224
User page callbacks for the role_watchdog module.

Code

function _og_role_watchdog_history_rows($result, $roles, $actions) {
  $view_profile = user_access('access user profiles');
  foreach ($result as $hid => $row) {
    $group = '-';
    if ($row->rid == ROLE_WATCHDOG_NO_ROLE) {
      $group = "GROUP!";
      $role = "GROUP ROLE!";
    }
    else {
      $role = $roles[$row->rid];
    }
    $row_data = array(
      $view_profile ? l($row->admin, 'user/' . $row->adminid) : $row->admin,
      format_date($row->stamp),
      $group,
      $role,
      $actions[$row->action],
      $view_profile ? l($row->name, 'user/' . $row->uid) : $row->name,
    );
    $rows[] = $row_data;
  }
  return $rows;
}