Diff

core/usermanager.lua @ 7177:1295e14614f4

usermanager: Shortcircuit user existence check if they have existing sessions
author Kim Alvefur <zash@zash.se>
date Sun, 21 Feb 2016 19:30:45 +0100
parent 6979:0ce2b400663b
child 8192:4354f556c5db
line wrap: on
line diff
--- a/core/usermanager.lua	Sun Feb 21 19:29:31 2016 +0100
+++ b/core/usermanager.lua	Sun Feb 21 19:30:45 2016 +0100
@@ -81,6 +81,7 @@
 end
 
 local function user_exists(username, host)
+	if hosts[host].sessions[username] then return true; end
 	return hosts[host].users.user_exists(username);
 end