I'm making some progress on loosely integrating smf with cmsms to insure that some pages are blocked unless the user is signed in to smf. (Since I don't know how to bridge sign-ins http://forum.cmsmadesimple.org/index.php/topic,42977.0.html.) The problem (one of them) is along with the sign-in form it also shows the content I want to hide.
I tried this as the UDF:
Code: Select all
require_once('./smf/SSI.php');
$Referrer = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$_SESSION['login_url'] = $Referrer;
$_SESSION['logout_url'] = $Referrer;
echo "$Referrer";
if ($context['user']['is_guest'])
{
ssi_login();
exit;
}
but the exit (of course) stops all output passed that point from being displayed. I guess I'm looking instead of the 'exit' to set a variable and then somehoe check that variable before displaying the content. If not logged in then don't display. Suggestions?