Software /
code /
prosody
Diff
core/usermanager.lua @ 60:44800be871f5
User registration, etc (jabber:iq:register)
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sun, 05 Oct 2008 04:55:45 +0500 |
parent | 53:14ea0fe6ca86 |
child | 228:875842235836 |
line wrap: on
line diff
--- a/core/usermanager.lua Sat Oct 04 17:59:32 2008 +0100 +++ b/core/usermanager.lua Sun Oct 05 04:55:45 2008 +0500 @@ -12,4 +12,12 @@ 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