Mercurial > prosody-hg
comparison core/usermanager.lua @ 3116:90a98a6b52ac
Merge 0.7->trunk
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Sun, 23 May 2010 23:11:00 +0100 |
| parents | 0b8bd6f6a9c7 30896751dd43 |
| children | b01a699ddf64 |
comparison
equal
deleted
inserted
replaced
| 3081:4ee34d07e042 | 3116:90a98a6b52ac |
|---|---|
| 72 return nil, "Account not available."; | 72 return nil, "Account not available."; |
| 73 end | 73 end |
| 74 | 74 |
| 75 function provider:user_exists(username) | 75 function provider:user_exists(username) |
| 76 if not(require_provisioning) and is_cyrus(host) then return true; end | 76 if not(require_provisioning) and is_cyrus(host) then return true; end |
| 77 return datamanager.load(username, host, "accounts") ~= nil; -- FIXME also check for empty credentials | 77 local account, err = datamanager.load(username, host, "accounts") ~= nil; -- FIXME also check for empty credentials |
| 78 return (account or err) ~= nil; -- FIXME also check for empty credentials | |
| 78 end | 79 end |
| 79 | 80 |
| 80 function provider:create_user(username, password) | 81 function provider:create_user(username, password) |
| 81 if not(require_provisioning) and is_cyrus(host) then return nil, "Account creation/modification not available with Cyrus SASL."; end | 82 if not(require_provisioning) and is_cyrus(host) then return nil, "Account creation/modification not available with Cyrus SASL."; end |
| 82 return datamanager.store(username, host, "accounts", {password = password}); | 83 return datamanager.store(username, host, "accounts", {password = password}); |
