Software /
code /
prosody
Changeset
3113:30896751dd43
usermanager: Take datamanager errors into account when determining account existance.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Mon, 24 May 2010 00:49:12 +0500 |
parents | 3112:c311fdffccce |
children | 3114:75ea1aff69da |
files | core/usermanager.lua |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/core/usermanager.lua Mon May 24 00:37:15 2010 +0500 +++ b/core/usermanager.lua Mon May 24 00:49:12 2010 +0500 @@ -69,7 +69,8 @@ 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)