function _autologout_local_settings in Automated Logout 7.2
Same name and namespace in other branches
- 5 autologout.module \_autologout_local_settings()
- 6 autologout.module \_autologout_local_settings()
- 6.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()
7 calls to _autologout_local_settings()
- autologout_admin_settings in ./
autologout.admin.inc - Settings form for menu callback
- autologout_block_configure in ./
autologout.module - Implements hook_block_configure().
- autologout_block_view in ./
autologout.module - Implements hook_block_view().
- autologout_init in ./
autologout.module - Implements hook_init().
- autologout_logout in ./
autologout.module
File
- ./
autologout.module, line 508 - Used to automagically log out a user after a preset time, AjK May 2006
Code
function _autologout_local_settings($name = FALSE) {
$defaults = (array) new autologout_default_settings();
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
}
}