Changeset

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
parents 7176:b8bbd5f91ad9
children 7178:5953f415c815
files core/usermanager.lua
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
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