aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2008-10-05 01:32:43 +0100
committerMatthew Wild <mwild1@gmail.com>2008-10-05 01:32:43 +0100
commit84219ab443bf5c6d19f32d3e64db92c65fecef7f (patch)
treeda65923a6f525661913684b1faacc7759b95fa94 /core
parentc64b4c069eca2147e4296a7cf6ccc3801ea115bc (diff)
parent95367859295d23cb6a36079bb3b36caf6bdbd4ed (diff)
downloadprosody-84219ab443bf5c6d19f32d3e64db92c65fecef7f.tar.gz
prosody-84219ab443bf5c6d19f32d3e64db92c65fecef7f.zip
Merged mod_InBandRegistration from waqas
Diffstat (limited to 'core')
-rw-r--r--core/modulemanager.lua1
-rw-r--r--core/usermanager.lua8
2 files changed, 9 insertions, 0 deletions
diff --git a/core/modulemanager.lua b/core/modulemanager.lua
index 6d803a26..0aaf4d1f 100644
--- a/core/modulemanager.lua
+++ b/core/modulemanager.lua
@@ -48,6 +48,7 @@ function loadall()
load("saslauth");
load("legacyauth");
load("roster");
+ load("InBandRegistration");
end
function load(name)
diff --git a/core/usermanager.lua b/core/usermanager.lua
index 0f303b24..e38acc87 100644
--- a/core/usermanager.lua
+++ b/core/usermanager.lua
@@ -12,4 +12,12 @@ function validate_credentials(host, username, password)
return false;
end
+function user_exists(username, host)
+ return datamanager.load(username, host, "accounts") ~= nil;
+end
+
+function create_user(username, password, host)
+ return datamanager.store(username, host, "accounts", {password = password});
+end
+
return _M; \ No newline at end of file