Forcing a user login on any page in the site
Sometimes you might want to force the user to login before accessing any area of the site. You could put something like this in the application.php file, as that file is required at the top of every cartweaver page.
if(! isset($_SESSION["customerID"]) || $_SESSION["customerID"] == "0") {
include("cw2/CWIncLoginForm.php");
exit();
}
Put it right after this line, but before the setup files:
require_once("cw2/CWLibrary/CWSearch.php");
// insert the code here




Blog RSS feed













