From 4353f95a958a306dfb990d84abe7a922ece80126 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Mon, 24 May 2010 00:49:12 +0500 Subject: usermanager: Take datamanager errors into account when determining account existance. --- core/usermanager.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core') diff --git a/core/usermanager.lua b/core/usermanager.lua index 42e49d38..698d2f10 100644 --- a/core/usermanager.lua +++ b/core/usermanager.lua @@ -69,7 +69,8 @@ end function user_exists(username, host) if not(require_provisioning) and is_cyrus(host) then return true; end - return datamanager.load(username, host, "accounts") ~= nil; -- FIXME also check for empty credentials + local account, err = datamanager.load(username, host, "accounts"); + return (account or err) ~= nil; -- FIXME also check for empty credentials end function create_user(username, password, host) -- cgit v1.2.3