You are here

function og_quiz_user_results_access in OG Quiz 7

Custom access callback for viewing user results tab

Parameters

int $uid:

Return value

bool

1 string reference to 'og_quiz_user_results_access'
og_quiz_menu_alter in ./og_quiz.module
Implements hook_menu_alter().

File

./og_quiz.module, line 284
Module hooks and custom logic.

Code

function og_quiz_user_results_access($uid) {
  global $user;
  if (!($access = og_quiz_user_access($user, 'view any quiz results'))) {
    if ($access = og_quiz_user_access($user, 'view own quiz results')) {
      $access = $access && $uid == $user->uid;
    }
  }
  return isset($access) ? $access : _quiz_user_results_access($uid);
}