function session_cookie_lifetime_get_lifetime in Session cookie lifetime 7
Get the session cookie lifetime.
Return value
int|null NUll is server default, otherwise it's the expiry time in seconds.
1 call to session_cookie_lifetime_get_lifetime()
- session_cookie_lifetime_init in ./
session_cookie_lifetime.module - Implements hook_init().
File
- ./
session_cookie_lifetime.module, line 105 - Session configuration Drupal module.
Code
function session_cookie_lifetime_get_lifetime() {
$type = variable_get('session_cookie_lifetime_type', 'default');
$lifetime = 0;
switch ($type) {
case 'default':
$lifetime = NULL;
break;
case 'browser_session':
$lifetime = 0;
break;
case 'time':
$amount = variable_get('session_cookie_lifetime_amount', 0);
$multiplier = variable_get('session_cookie_lifetime_multiplier', 60);
$lifetime = $amount * $multiplier;
break;
}
return $lifetime;
}