aboutsummaryrefslogtreecommitdiffstats
path: root/core/usermanager.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-05-24 00:49:12 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-05-24 00:49:12 +0500
commit4353f95a958a306dfb990d84abe7a922ece80126 (patch)
treee3217f3893e7d19c3ae1ace3abe2e4675703d81b /core/usermanager.lua
parent6523b2bbe5e7ae92e241e10c587acbb61ec8eb77 (diff)
downloadprosody-4353f95a958a306dfb990d84abe7a922ece80126.tar.gz
prosody-4353f95a958a306dfb990d84abe7a922ece80126.zip
usermanager: Take datamanager errors into account when determining account existance.
Diffstat (limited to 'core/usermanager.lua')
-rw-r--r--core/usermanager.lua3
1 files changed, 2 insertions, 1 deletions
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)