aboutsummaryrefslogtreecommitdiffstats
path: root/core/usermanager.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-02-21 19:30:45 +0100
committerKim Alvefur <zash@zash.se>2016-02-21 19:30:45 +0100
commit28585f40e30b5aabe1fe4f1814dfe49115352035 (patch)
treeb71c2080e0a1774ad27e4e5778cafac73af27203 /core/usermanager.lua
parent71d2dced8dd98ce1b1bf67e2ebbae981cf85287c (diff)
downloadprosody-28585f40e30b5aabe1fe4f1814dfe49115352035.tar.gz
prosody-28585f40e30b5aabe1fe4f1814dfe49115352035.zip
usermanager: Shortcircuit user existence check if they have existing sessions
Diffstat (limited to 'core/usermanager.lua')
-rw-r--r--core/usermanager.lua1
1 files changed, 1 insertions, 0 deletions
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