Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
executable file 28 lines (23 sloc) 761 Bytes
-- Checking script example
-- Assumes that the login form will use two fields called username and pass
local username = cgilua.POST.username
local pass = cgilua.POST.pass
local logged, err, logoutURL
if cgilua.authentication then
logged, err = cgilua.authentication.check(username, pass)
username = cgilua.authentication.username() or ""
logoutURL = cgilua.authentication.logoutURL()
else
logged = false
err = "No authentication configured!"
username = ""
end
if logged and username then
cgilua.redirect(cgilua.authentication.refURL())
else
err = err or ""
cgilua.htmlheader()
cgilua.lp.include ("login.lp", {
logged = logged, errorMsg = err, username = username,
cgilua = cgilua, logoutURL = logoutURL})
end