Tom Muck

Cartweaver | Flash Remoting | Community MX | CMXtraneous
Home page
All articles | DWTeam | Flash Remoting | Basic-Ultradev | Community MX
All Extensions | Extension News | Extension FAQs | Customer Login
Books authored or co-authored by Tom Muck
Extensions, books, and other products | Customer Login
Your current cart contents
Tom-Muck.com Blog | CMXTraneous Blog | Flash Remoting Blog
About the site

Force Login

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

Back to Cartweaver PHP FAQ, code changes, and samples

Pay me securely with your Visa, MasterCard, Discover, or American Express card through PayPal!
Pay me securely with your Visa, MasterCard, Discover, or American Express card through PayPal!

Powered by Cartweaver

About | Privacy Policy | Contact | License Agreement | ©2002-2008 Tom Muck | Dreamweaver Extensions