File

core/usermanager.lua @ 57:126b25079399

Fix setting resource before we even know what it is
author Matthew Wild <mwild1@gmail.com>
date Sat, 04 Oct 2008 17:59:32 +0100
parent 53:14ea0fe6ca86
child 60:44800be871f5
line wrap: on
line source


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;