From: Kim Alvefur Date: Sun, 21 Feb 2016 18:30:45 +0000 (+0100) Subject: usermanager: Shortcircuit user existence check if they have existing sessions X-Git-Url: https://git.enpas.org/?a=commitdiff_plain;h=1cf8d71469991a8cd984ea189190e4c7c25f8174;p=prosody.git usermanager: Shortcircuit user existence check if they have existing sessions --- diff --git a/core/usermanager.lua b/core/usermanager.lua index 0d8d7f91..d5132662 100644 --- a/core/usermanager.lua +++ b/core/usermanager.lua @@ -81,6 +81,7 @@ local function set_password(username, password, host) end local function user_exists(username, host) + if hosts[host].sessions[username] then return true; end return hosts[host].users.user_exists(username); end