close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Page Access Not Working

Thread began 5/09/2011 5:50 am by A Sound Design | Last modified 5/09/2011 7:51 am by A Sound Design | 1827 views | 1 replies

A Sound Design

Page Access Not Working

I have used Form Builder to create registration and login pages, ie. am not using the SA wizard. I have used the page access server behaviour to protect an admin homepage using

<?php require_once( "../WA_SecurityAssist/Helper_PHP.php" ); ?>
<?php
if (!WA_Auth_RulePasses("Administrator")){
WA_Auth_RestrictAccess("login_failed.php");
}
?>

at the top of the page.

The login page should redirect to the admin homepage on successful login.

The registration page works well but when I try to login I continually get redirected to my 'login denied' page. I have checked the actual username and password to make sure they are correct so it is not the wrong details.

The page access is based upon username, password and user level. In the MySQL table it has UserLevel as Int(11).

The SA Authenticate User behaviours code is:

<?php
if(isset($_POST["Securelogin_submit"])){
$WA_Auth_Parameter = array(
"connection" => $connDB,
"database" => $database_connDB,
"tableName" => "users",
"columns" => explode($WA_Auth_Separator,"username".$WA_Auth_Separator."password"),
"columnValues" => explode($WA_Auth_Separator,"".((isset($_POST["Username"]))?$_POST["Username"]:"") ."".$WA_Auth_Separator."".WA_SHA1Encryption(((isset($_POST["Password"]))?$_POST["Password"]:"")) .""),
"columnTypes" => explode($WA_Auth_Separator,"text".$WA_Auth_Separator."text"),
"sessionColumns" => explode($WA_Auth_Separator,"memberID"),
"sessionNames" => explode($WA_Auth_Separator,"memberID"),
"successRedirect" => "admin_homepage.php",
"failRedirect" => "login_failed.php",
"gotoPreviousURL" => FALSE,
"keepQueryString" => FALSE
);

WA_AuthenticateUser($WA_Auth_Parameter);
}
?>

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...