usermanager: Shortcircuit user existence check if they have existing sessions
authorKim Alvefur <zash@zash.se>
Sun, 21 Feb 2016 18:30:45 +0000 (19:30 +0100)
committerKim Alvefur <zash@zash.se>
Sun, 21 Feb 2016 18:30:45 +0000 (19:30 +0100)
core/usermanager.lua

index 0d8d7f91a125b6ccc671f10d888778714e2555e4..d5132662b08a9b9fb404de2b0682704e88bbefcc 100644 (file)
@@ -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