You are here

function _role_watchdog_history_rows in Role Watchdog 7

Same name and namespace in other branches
  1. 6.2 role_watchdog.pages.inc \_role_watchdog_history_rows()
  2. 6 role_watchdog.pages.inc \_role_watchdog_history_rows()
  3. 7.2 role_watchdog.pages.inc \_role_watchdog_history_rows()
1 call to _role_watchdog_history_rows()
role_watchdog_report in ./role_watchdog.pages.inc

File

./role_watchdog.pages.inc, line 175
User page callbacks for the role_watchdog module.

Code

function _role_watchdog_history_rows($result, $roles, $actions) {
  $view_profile = user_access('access user profiles');
  foreach ($result as $hid => $row) {
    $row_data = array(
      format_date($row->stamp),
      $roles[$row->rid],
      $actions[$row->action],
      $view_profile ? l($row->name, 'user/' . $row->uid) : $row->name,
    );
    if (isset($row->admin)) {
      array_unshift($row_data, $view_profile ? l($row->admin, 'user/' . $row->adminid) : $row->admin);
    }
    $rows[] = $row_data;
  }
  return $rows;
}