function _autologout_local_settings in Automated Logout 6.2
Same name and namespace in other branches
- 5 autologout.module \_autologout_local_settings()
- 6 autologout.module \_autologout_local_settings()
- 7.2 autologout.module \_autologout_local_settings()
_autologout_local_settings($name = FALSE)
Used to get a modules "settings" value. Note, the "out of box" settings are defined by the place holder class
Parameters
$name: A string of the variable name to get or FALSE return all variables as array
Return value
mixed array of all variables (if param was false) string the named variabled value
See also
autologout_default_settings()
6 calls to _autologout_local_settings()
- autologout_admin_settings in ./
autologout.admin.inc - Settings form for menu callback
- autologout_block in ./
autologout.module - Implementation of hook_block().
- autologout_init in ./
autologout.module - Implementation of hook_init().
- autologout_logout in ./
autologout.module - _autologout_exclude_by_role in ./
autologout.module - _autologout_exclude_by_role()
File
- ./
autologout.module, line 430 - Used to automagically log out a user after a preset time, AjK May 2006
Code
function _autologout_local_settings($name = FALSE) {
// Default settings.
$defaults = array(
'enabled' => FALSE,
'timeout' => 3600,
'refresh_delta' => 0,
'use_watchdog' => 1,
'block_title' => t('automatic logout in'),
'logout_message' => t('You have been automatically logged out due to inactivity.'),
);
if (!($settings = variable_get('autologout', FALSE))) {
$settings = $defaults;
}
if (FALSE != $name) {
if (!isset($settings[$name]) && isset($defaults[$name])) {
return $defaults[$name];
}
elseif (!isset($settings[$name]) && !isset($defaults[$name])) {
return NULL;
}
else {
return $settings[$name];
}
}
else {
return $settings;
// return the entire array
}
}