You are here

function persistent_login_requirements in Persistent Login 7

Same name and namespace in other branches
  1. 8 persistent_login.install \persistent_login_requirements()
  2. 6 persistent_login.install \persistent_login_requirements()

Implementation of hook_requirements().

File

./persistent_login.install, line 74
Implementation of installation/uninstallation hooks.

Code

function persistent_login_requirements($phase) {
  $requirements = array();
  switch ($phase) {
    case 'runtime':
      $lifetime = ini_get('session.cookie_lifetime');
      if ($lifetime > 0) {
        $requirements['persistent_login'] = array(
          'title' => t('PHP session cookie lifetime'),
          'severity' => REQUIREMENT_ERROR,
          'description' => _persistent_login_get_config_warning_msg(),
          'value' => $lifetime,
        );
      }
      break;
  }
  return $requirements;
}