summaryrefslogtreecommitdiff
path: root/includes/session.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/session.inc')
-rw-r--r--includes/session.inc14
1 files changed, 11 insertions, 3 deletions
diff --git a/includes/session.inc b/includes/session.inc
index 4c61bb637..922f0611a 100644
--- a/includes/session.inc
+++ b/includes/session.inc
@@ -125,13 +125,21 @@ function sess_count($timestamp = 0, $anonymous = true) {
/**
* Called by PHP session handling with the PHP session ID to end a user's session.
- * Can also be called directly, either with the PHP session ID or another identifier
- * such as uid to end a specific user's session.
+ *
+ * @param string $sid
+ * the session id
+ */
+function sess_destroy_sid($sid) {
+ db_query("DELETE FROM {sessions} WHERE sid = '%s'", $sid);
+}
+
+/**
+ * End a specific user's session
*
* @param string $uid
* the user id
*/
-function sess_destroy($uid) {
+function sess_destroy_uid($uid) {
db_query('DELETE FROM {sessions} WHERE uid = %d', $uid);
}