function _autologout_local_settings in Automated Logout 6
Same name and namespace in other branches
- 5 autologout.module \_autologout_local_settings()
- 6.2 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()
5 calls to _autologout_local_settings()
- autologout_block in ./
autologout.module - Implementation of hook_block().
- autologout_boot in ./
autologout.module - Implementation of hook_boot().
- _autologout_by_role in ./
autologout.module - _autologout_by_role()
- _autologout_settings in ./
autologout.module - Implementation of hook_settings().
- _autologout_user_in_by_user_role in ./
autologout.module
File
- ./
autologout.module, line 535 - 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
}
}