aboutsummaryrefslogtreecommitdiffstats
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
commit7d84f2f261e91a36f7414475e64893eb125c217d (patch)
treeb71c2080e0a1774ad27e4e5778cafac73af27203
parentc82c00424dd2f8be24f75c7a0b7e786061477180 (diff)
downloadprosody-7d84f2f261e91a36f7414475e64893eb125c217d.tar.gz
prosody-7d84f2f261e91a36f7414475e64893eb125c217d.zip
usermanager: Shortcircuit user existence check if they have existing sessions
-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