1 session.inc backdrop_session_destroy_uid($uid)

Ends a specific user's session(s).

Parameters

$uid: User ID.

File

core/includes/session.inc, line 512
User session handling functions.

Code

function backdrop_session_destroy_uid($uid) {
  // Nothing to do if we are not allowed to change the session.
  if (!backdrop_save_session()) {
    return;
  }

  db_delete('sessions')
    ->condition('uid', $uid)
    ->execute();
}