core/usermanager.lua

Sat, 04 Oct 2008 15:25:54 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Sat, 04 Oct 2008 15:25:54 +0100
changeset 53
14ea0fe6ca86
parent 38
3fdfd6e0cb4e
child 60
44800be871f5
permissions
-rw-r--r--

Session destruction fixes, some debugging code while we fix the rest. Also change logger to be more useful.


require "util.datamanager"
local datamanager = datamanager;
local log = require "util.logger".init("usermanager");

module "usermanager"

function validate_credentials(host, username, password)
	log("debug", "User '%s' is being validated", username);
	local credentials = datamanager.load(username, host, "accounts") or {};
	if password == credentials.password then return true; end
	return false;
end

return _M;

mercurial