Software /
code /
prosody
Comparison
core/usermanager.lua @ 1589:812ae3be7bed
usermanager: Reduced some code
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sat, 25 Jul 2009 19:18:37 +0500 |
parent | 1588:9107d3221ccb |
child | 2030:d9382a16af5b |
comparison
equal
deleted
inserted
replaced
1588:9107d3221ccb | 1589:812ae3be7bed |
---|---|
61 function create_user(username, password, host) | 61 function create_user(username, password, host) |
62 return datamanager.store(username, host, "accounts", {password = password}); | 62 return datamanager.store(username, host, "accounts", {password = password}); |
63 end | 63 end |
64 | 64 |
65 function get_supported_methods(host) | 65 function get_supported_methods(host) |
66 local methods = {["PLAIN"] = true}; -- TODO this should be taken from the config | 66 return {["PLAIN"] = true, ["DIGEST-MD5"] = true}; -- TODO this should be taken from the config |
67 methods["DIGEST-MD5"] = true; | |
68 return methods; | |
69 end | 67 end |
70 | 68 |
71 function is_admin(jid) | 69 function is_admin(jid) |
72 local admins = config.get("*", "core", "admins"); | 70 local admins = config.get("*", "core", "admins"); |
73 if type(admins) == "table" then | 71 if type(admins) == "table" then |