I'm trying to learn the new cfscript syntax, as well as use cflogin. I'm guessing I can't mix cf tags in cfscript, and I don't see a script equivalent to cflogin, cflogout, cfloginuser.
Should I call a component that is written in the CF8 syntax in order to use cflogin?
public void function onRequest(required string Page) output="true" {
if (StructKeyExists(url,"logout")) {
<cflogout>
}
<cflogin>
local.qryUsr = new Components.Usr.Login(form);
if (local.qryUsr.Recordcount) {
<cfloginuser name="#form.UsrName#" password="#form.UsrPassword#" roles="#local.qryUsr.Roles#">
} else {
request.errorMessage = "Incorrect login";
include login/login.cfm;
return;
}
</cflogin>
include arguments.Page;
}