You are here

function _role_watchdog_history_access in Role Watchdog 7

Same name and namespace in other branches
  1. 6.2 role_watchdog.module \_role_watchdog_history_access()
  2. 6 role_watchdog.module \_role_watchdog_history_access()
  3. 7.2 role_watchdog.module \_role_watchdog_history_access()

Access callback for viewing role history page.

1 string reference to '_role_watchdog_history_access'
role_watchdog_menu in ./role_watchdog.module
Implements hook_menu().

File

./role_watchdog.module, line 354
Logs changes to user roles.

Code

function _role_watchdog_history_access($account) {
  if (user_access('view role history')) {
    return TRUE;
  }
  global $user;
  return $user->uid == $account->uid && user_access('view own role history') ? TRUE : FALSE;
}