function _securesite_forced in Secure Site 7.2
Same name and namespace in other branches
- 6.2 securesite.inc \_securesite_forced()
Determine if Secure Site authentication should be forced.
5 calls to _securesite_forced()
- SecureSiteFunctionForcedUnitTest::testSecureSiteFunctionForced403 in ./
securesite.test - Check output with authentication forced on restricted pages.
- SecureSiteFunctionForcedUnitTest::testSecureSiteFunctionForcedAlways in ./
securesite.test - Check output with authentication always forced.
- SecureSiteFunctionForcedUnitTest::testSecureSiteFunctionForcedDisabled in ./
securesite.test - Check output without forced authentication.
- SecureSiteFunctionForcedUnitTest::testSecureSiteFunctionForcedOffline in ./
securesite.test - Check output with authentication forced when site is off line.
- securesite_boot in ./
securesite.module - Implements hook_boot().
File
- ./
securesite.inc, line 320 - Secure Site log-in functions.
Code
function _securesite_forced() {
global $base_path;
// Do we require credentials to display this page?
if (php_sapi_name() == 'cli' || $_GET['q'] == 'admin/reports/request-test') {
return FALSE;
}
else {
switch (variable_get('securesite_enabled', SECURESITE_DISABLED)) {
case SECURESITE_ALWAYS:
return TRUE;
case SECURESITE_OFFLINE:
return variable_get('site_offline', FALSE);
default:
return FALSE;
}
}
}