close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Multiple Restrict access not working

Thread began 11/01/2019 6:45 am by Michael | Last modified 11/05/2019 12:39 pm by Michael | 61 views | 3 replies


Originally Said By: Ray Borduin
  This has to be done a little differently with our extensions. Advanced page access rules are only available in Databridge, but I see you don't own that product.

The easiest solution (if you don't own DataBridge) is to save the same session variables that Dreamweaver login uses so that you can use the old restrict access server behavior based on user group.

They use:
MM_Username and MM_UserGroup

You can add those variable names to the list of saved columns in your login (it doesn't matter which column you use for MM_Username, but save the access group column as MM_UserGroup).

Then you can just use the Adobe Restrict Access to Page server behavior to do access group based page access.  

If I understand you sir, do you mean I should the following

1. Restrict access to using Adobe Restrict Access as seen below

if (!isset($_SESSION)) {
$MM_authorizedUsers = "SuperAdmin,Administrator";
$MM_donotCheckaccess = "false";

// *** Restrict Access To Page: Grant or deny access to this page
function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) {
// For security, start by assuming the visitor is NOT authorized.
$isValid = False;

// When a visitor has logged into this site, the Session variable MM_Username set equal to their username.
// Therefore, we know that a user is NOT logged in if that Session variable is blank.
if (!empty($UserName)) {
// Besides being logged in, you may restrict access to only certain users based on an ID established when they login.
// Parse the strings into arrays.
$arrUsers = Explode(",", $strUsers);
$arrGroups = Explode(",", $strGroups);
if (in_array($UserName, $arrUsers)) {
$isValid = true;
// Or, you may restrict access to only certain users based on their username.
if (in_array($UserGroup, $arrGroups)) {
$isValid = true;
if (($strUsers == "") && false) {
$isValid = true;
return $isValid;

$MM_restrictGoTo = "errorlogin.php";
if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {
$MM_qsChar = "?";
$MM_referrer = $_SERVER['PHP_SELF'];
if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
if (isset($_SERVER['QUERY_STRING']) && strlen($_SERVER['QUERY_STRING']) > 0)
$MM_referrer .= "?" . $_SERVER['QUERY_STRING'];
$MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);
header("Location: ". $MM_restrictGoTo);

2. Add those variable names (which are: MM_Username and MM_UserGroup) to the list of saved columns in your login as seen below

$Authenticate = new WA_MySQLi_Auth($DBMS);
$Authenticate->Action = "authenticate";
$Authenticate->Trigger = ($_SERVER["REQUEST_METHOD"] === "POST");
$Authenticate->Name = "Administrator";
$Authenticate->Table = "admin_login";
$Authenticate->addFilter("user_name", "=", "s", "".((isset($_POST["user_name"]))?$_POST["user_name"]:"") ."");
$Authenticate->addFilter("password", "=", "s", "".((isset($_POST["password"]))?md5($_POST["password"]):"") ."");
$Authenticate->addFilter("level", "=", "s", "".((isset($_POST["level"]))?$_POST["level"]:"") ."");
$Authenticate->storeResult("MM_Username", "MM_Username");
$Authenticate->storeResult("password", "password");
$Authenticate->storeResult("MM_UserGroup", "MM_UserGroup");
$Authenticate->RememberMe = (false);
$Authenticate->SaveLogin = (true);
$Authenticate->AutoReturn = false;
$SuccessRedirect = "dashboard.php";
$FailedRedirect = "errorlogin.php";
if (function_exists("rel2abs")) $SuccessRedirect = $SuccessRedirect?rel2abs($SuccessRedirect,dirname(__FILE__)):"";
if (function_exists("rel2abs")) $FailedRedirect = $FailedRedirect?rel2abs($FailedRedirect,dirname(__FILE__)):"";
$Authenticate->SuccessRedirect = $SuccessRedirect;
$Authenticate->FailRedirect = $FailedRedirect;

Kindly advice please.

Thank you so much

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





Ease of use


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...