function drupal_session_destroy_uid

7.x session.inc drupal_session_destroy_uid($uid)

Ends a specific user's session(s).

Parameters

$uid: User ID.

2 calls to drupal_session_destroy_uid()
user_delete_multiple in drupal-7.x/modules/user/user.module
Delete multiple user accounts.
user_save in drupal-7.x/modules/user/user.module
Save changes to a user account or add a new user.

File

drupal-7.x/includes/session.inc, line 477
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();
}