Right now the site I am working on has a restrict access set up for two levels, but the way they set up their registration, once someone registers, they can login to the member side without first being activated in the database. I'd like to be able to adjust the restriction kind of like a where clause, where activation= 1 or something to that effect. Is this possible or does anyone have any advice or help for me? Thanks.

When the user registers, set the value for activation column as 0 (for that user) in the user table. When the user activates, update activation column to 1 for that user. Then, when the user tries to log in, while checking for username and password, also check if activation=1. If it isn't 1, promt him to activate first.

like nav33n said, and use sessions to store activation and add as include on each page.

I'm using ADDT to do this, when I click on the Restrict Access under Server Behaviors, where would I go to add activation=1 and the sessions ? Thanks.

Can you be more specific ? If you post your code and the database structure, it will be easier for us to help you !

The database is Mysql, and is working with a User table.

//Start Restrict Access To Page
$restrict = new tNG_RestrictAccess($conn_nscar, "../");
//Grand Levels: Level
$restrict->addLevel("0");
$restrict->Execute();
//End Restrict Access To Page

// Start trigger
$formValidation = new tNG_FormValidation();
$formValidation->addField("kt_login_user", true, "text", "", "", "", "");
$formValidation->addField("kt_login_password", true, "text", "", "", "", "");
$tNGs->prepareValidation($formValidation);
// End trigger

// Make a login transaction instance
$loginTransaction = new tNG_login($conn_nscar);
$tNGs->addTransaction($loginTransaction);
// Register triggers
$loginTransaction->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "kt_login1");
$loginTransaction->registerTrigger("BEFORE", "Trigger_Default_FormValidation", 10, $formValidation);
$loginTransaction->registerTrigger("END", "Trigger_Default_Redirect", 99, "{kt_login_redirect}");
// Add columns
$loginTransaction->addColumn("kt_login_user", "STRING_TYPE", "POST", "kt_login_user");
$loginTransaction->addColumn("kt_login_password", "STRING_TYPE", "POST", "kt_login_password");
$loginTransaction->addColumn("kt_login_rememberme", "CHECKBOX_1_0_TYPE", "POST", "kt_login_rememberme", "0");
// End of login transaction instance

Thanks for your help

Umm.. Sorry ! I don't understand what exactly your code does.. But, you can do it as I have said in my previous post.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.