function drupal_session_started

7.x session.inc drupal_session_started($set = NULL)

Returns whether a session has been started.

3 calls to drupal_session_started()
drupal_session_commit in drupal-7.x/includes/session.inc
Commits the current session, if necessary.
drupal_session_regenerate in drupal-7.x/includes/session.inc
Called when an anonymous user becomes authenticated or vice-versa.
drupal_session_start in drupal-7.x/includes/session.inc
Starts a session forcefully, preserving already set session data.

File

drupal-7.x/includes/session.inc, line 337
User session handling functions.

Code

function drupal_session_started($set = NULL) {
  static $session_started = FALSE;
  if (isset($set)) {
    $session_started = $set;
  }
  return $session_started && session_id();
}