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

rating

redirect to different locations on login

Thread began 7/03/2019 5:08 am by s.joiner74419001 | Last modified 7/04/2019 12:52 pm by Ray Borduin | 17 views | 1 replies |

s.joiner74419001

redirect to different locations on login

Need to re-ignite this thread as I am having similar issue with my system that requires a different re-direct on login ( or an appropriate location to apply the behaviour ) depending on the value from the table that is used to authenticate the user.

- I have attached a screen shot of the table that is used for this.
- table is named - ‘registered_apps’

- The column I want to use to determine the redirect is the ‘user_level’ column.
- ‘user-level’ has two values - ‘custom’ and ‘standard’

- The two destinations would be - ‘consent-collation.php’ OR ‘../britannia-house/consent-collation.php’

I can’t work out how to construct the ‘restrict access’ behaviours and where to put them, and how to do this along side the MySQLi server behaviours. assuming this is still the best solution.

So I have tried to setup as follows:

case "Britannia Access":
$comparisons[0] = array(TRUE, "".((isset($_SESSION['user_level']))?$_SESSION['user_level']:"") ."", 1, "standard");
break;
The user level session is saved in Login which will either be ‘standard’ or ’custom’.

I’ve then added a “MySQLi / User Authentication / MySQLi restrict access to page” behaviour to the page that login directs to:

<?php
if (WA_Auth_RulePasses("Britannia Access")) {
$RestrictAccess = new WA_MySQLi_Auth();
$RestrictAccess->Action = "restrict";
$RestrictAccess->Name = "LoggedIn";
$RestricAccessRedirect = "../britannia-house/consent-collation.php";
if (function_exists("rel2abs")) $RestricAccessRedirect = $RestricAccessRedirect?rel2abs($RestricAccessRedirect,dirname(__FILE__)):"";
$RestrictAccess->FailRedirect = $RestricAccessRedirect;
$RestrictAccess->execute();
}
?>

So what I thought would happen here is on Login. if the ‘user_level’ session value is ’standard’ then access is passed and it re-directs to the normal ‘consent-collation.php’ page.

But if the ‘user-level’ session value is ‘custom’ then the access fails and it re-directs to the custom page ‘../britannia-house/consent-collation.php’

Another issue I am having is an error with the 'Edit Access Rule' window. The 'Criteria' field sits behind the 'Comparison' Field and can not be accessed. ( see attached )

I am using DW cc 19.1

Thanks in advance.

Sign in to reply to this post

Ray BorduinWebAssist

I'd probably set up the authentication server behavior to redirect to an operator.php page that can just have two restrict access rules to redirect to the appropriate page based on the value of the saved session variable.

So the login takes them to operator.php which is a blank page that has three redirect rules. If they aren't logged it it takes them to the login page, then two more to check the value of the session variable and redirect to the correct page.

Sign in to reply to this post

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