You are here

function userprotect_administrator_bypass_defaults in User protect 7

Same name and namespace in other branches
  1. 5 userprotect.module \userprotect_administrator_bypass_defaults()
  2. 6 userprotect.module \userprotect_administrator_bypass_defaults()

Builds an array of the inital default bypass settings for user admins.

Return value

array The default bypass array.

2 calls to userprotect_administrator_bypass_defaults()
userprotect_check_bypass in ./userprotect.module
Checks to see if the current user can bypass a protection.
userprotect_protection_defaults in ./userprotect.admin.inc
Builds a form for the userprotect default settings.
7 string references to 'userprotect_administrator_bypass_defaults'
UserProtectBypassWebTest::doCheckBypass in tests/UserProtectBypassWebTest.test
Tests if bypassing a certain protection is respected.
UserProtectBypassWebTest::setUp in tests/UserProtectBypassWebTest.test
Overrides DrupalWebTestCase::setUp().
UserProtectProtectionWebTest::setUp in tests/UserProtectProtectionWebTest.test
Overrides DrupalWebTestCase::setUp().
UserProtectViewsBulkOperationsWebTest::setUp in tests/UserProtectViewsBulkOperationsWebTest.test
Overrides DrupalWebTestCase::setUp().
userprotect_check_bypass in ./userprotect.module
Checks to see if the current user can bypass a protection.

... See full list

File

./userprotect.module, line 684
Main module file for the userprotect module.

Code

function userprotect_administrator_bypass_defaults() {
  $defaults = array();
  $protections = userprotect_user_protection_defaults();
  foreach ($protections as $protection => $value) {
    $defaults[$protection] = 0;
  }
  return $defaults;
}