You are here

function _autologout_local_settings in Automated Logout 5

Same name and namespace in other branches
  1. 6 autologout.module \_autologout_local_settings()
  2. 6.2 autologout.module \_autologout_local_settings()
  3. 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_block in ./autologout.module
Implementation of hook_block()
autologout_footer in ./autologout.module
Implementation of hook_footer()
autologout_nodeapi in ./autologout.module
Implementation of hook_nodeapi()
_autologout_by_role in ./autologout.module
_autologout_by_role()
_autologout_settings in ./autologout.module
Implementation of hook_settings

... See full list

File

./autologout.module, line 494
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
  }
}