Merge backout
authorMatthew Wild <mwild1@gmail.com>
Fri, 4 Jun 2010 10:59:27 +0000 (11:59 +0100)
committerMatthew Wild <mwild1@gmail.com>
Fri, 4 Jun 2010 10:59:27 +0000 (11:59 +0100)
1  2 
core/usermanager.lua

index 07097dc1b97a81d11eaee2bc1e1405b234b5a9b0,a97e2ad701ce2551acee6c139bf6f54a9e74110f..e46546987af3317bdadb8a0e1a635154305cd2f7
@@@ -72,14 -70,13 +72,14 @@@ function new_default_provider(host
                return nil, "Account not available.";
        end
  
-       function provider:user_exists(username)
+       function provider.user_exists(username)
 -              if is_cyrus(host) then return true; end
 -              return datamanager.load(username, host, "accounts") ~= nil; -- FIXME also check for empty credentials
 +              if not(require_provisioning) and is_cyrus(host) then return true; end
 +              local account, err = datamanager.load(username, host, "accounts") ~= nil; -- FIXME also check for empty credentials
 +              return (account or err) ~= nil; -- FIXME also check for empty credentials
        end
  
-       function provider:create_user(username, password)
+       function provider.create_user(username, password)
 -              if is_cyrus(host) then return nil, "Account creation/modification not available with Cyrus SASL."; end
 +              if not(require_provisioning) and is_cyrus(host) then return nil, "Account creation/modification not available with Cyrus SASL."; end
                return datamanager.store(username, host, "accounts", {password = password});
        end