function drupal_session_destroy_uid

Ends a specific user's session(s).

Parameters

$uid: User ID.

1 call to drupal_session_destroy_uid()

File

drupal/core/includes/session.inc, line 474
User session handling functions.

Code

function drupal_session_destroy_uid($uid) {

  // Nothing to do if we are not allowed to change the session.
  if (!drupal_save_session()) {
    return;
  }
  db_delete('sessions')
    ->condition('uid', $uid)
    ->execute();
}