aboutsummaryrefslogtreecommitdiffstats
path: root/core/usermanager.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2008-10-05 04:55:45 +0500
committerWaqas Hussain <waqas20@gmail.com>2008-10-05 04:55:45 +0500
commit95367859295d23cb6a36079bb3b36caf6bdbd4ed (patch)
tree6daf3116e1d722d1a86c0f769d1317c524c03464 /core/usermanager.lua
parent5239107016cf58af6ac10d9b8a436b4da2ff130c (diff)
downloadprosody-95367859295d23cb6a36079bb3b36caf6bdbd4ed.tar.gz
prosody-95367859295d23cb6a36079bb3b36caf6bdbd4ed.zip
User registration, etc (jabber:iq:register)
Diffstat (limited to 'core/usermanager.lua')
-rw-r--r--core/usermanager.lua8
1 files changed, 8 insertions, 0 deletions
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