For log in I used two functions... one for cfm login &
the other for phpbb login.
Using the first function to simply log into my cfm site, I
stored both the phpbb username and password in session scope. This
infomation I used for the second function.
<cffunction name="inphpbb" access="public"
returntype="string">
<cfargument name="username" type="string"
required="yes">
<cfargument name="password" type="string"
required="yes">
<cfinclude template="phpbb_login_script.cfm">
<cfabort>
<cfreturn noResult>
</cffunction>
Included phpbb_login_script.cfm:
<cfif not isdefined('session.login')>
<cflocation url="#application.homepage#" addtoken="no">
</cfif>
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
</head>
<body onload="document.phpbblogin.submit();">
<cfoutput>
<form name="phpbblogin" action="
http://www.yoursite.com/phpbb/login.php"
method="post">
<input name="username" type="hidden"
value="#arguments.username#" />
<input name="password" type="hidden"
value="#arguments.password#" />
<input name="autologin" type="hidden" value="1" />
<input type="hidden" name="redirect" value="
http://www.yoursite.com/alldone.cfm">
<input name="login" type="hidden" value="Log in" />
</form>
</cfoutput>
</body>
</html>
Important:
One small edit must be made to your login.php.
Approx line 104, Comment redirect(append_sid($url, true));
In it's place type, header("location:
".$HTTP_POST_VARS['redirect']); exit();
This was a lot quickly. So if any questions, I'll be checking
back periodically. Thanks to all whom helped me with aspects of
this code (Mike, Dan).
No I need to figure out how to sign out both, should be
easier.