You are here

function quiz_access_multi_or in Quiz 7.5

Same name and namespace in other branches
  1. 8.4 quiz.module \quiz_access_multi_or()
  2. 6.4 quiz.module \quiz_access_multi_or()
  3. 7.6 quiz.module \quiz_access_multi_or()
  4. 7 quiz.module \quiz_access_multi_or()
  5. 7.4 quiz.module \quiz_access_multi_or()

Helper function to check if the user has any of a given list of permissions.

Parameters

args: Any number of permissions.

Return value

true|null Returns TRUE if the user has access to any of the arguments given, Null otherwise.

1 string reference to 'quiz_access_multi_or'
quiz_menu in ./quiz.module
Implements hook_menu().

File

./quiz.module, line 295
quiz.module Main file for the Quiz module.

Code

function quiz_access_multi_or() {
  $perms = func_get_args();
  foreach ($perms as $perm) {
    if (user_access($perm)) {
      return TRUE;
    }
  }
}