Commit 31436bca authored by Francois Marier's avatar Francois Marier Committed by Gerrit Code Review
Browse files

Merge "Only allow remove_user_sessions to be called for a single user (bug #745345)"

parents de45eacb 8bb1b7ca
......@@ -273,15 +273,13 @@ function insert_messages() {
function remove_user_sessions($userid=null) {
* Delete all sessions belonging to a given user except for the current one
function remove_user_sessions($userid) {
global $sessionpath, $USER;
if (is_null($userid)) {
$sessionids = get_column('usr_session', 'session');
else {
$sessionids = get_column('usr_session', 'session', 'usr', $userid);
$sessionids = get_column('usr_session', 'session', 'usr', (int) $userid);
if (empty($sessionids)) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment