Copy link to clipboard
Copied
Using the Log In User server behavior I am trying to redirect users to different pages based on their access level. For example, users of access level X would be redirected to x.html while users of access level Y would be redirected to y.html and so on. Any idea how I can adapt the code generated by the Log In User server behavior to give my login page this capability? I'm using php/mysql.
Thanks,
Reiger
With the Dreamweaver Log In User server behavior, you send users to a single page if they log in successfully. Set that page to accept users of both access levels.
Inside the page, use a conditional statement to redirect the users to their relevant pages. Access level is stored in a session variable called $_SESSION['MM_UserGroup'].
...if ($_SESSION['MM_UserGroup'] == 'x') {
header('Location: http://www.example.com/x.php');
exit;
} elseif ($_SESSION['MM_UserGroup'] == 'y') {
header('Location: http:
Copy link to clipboard
Copied
With the Dreamweaver Log In User server behavior, you send users to a single page if they log in successfully. Set that page to accept users of both access levels.
Inside the page, use a conditional statement to redirect the users to their relevant pages. Access level is stored in a session variable called $_SESSION['MM_UserGroup'].
if ($_SESSION['MM_UserGroup'] == 'x') {
header('Location: http://www.example.com/x.php');
exit;
} elseif ($_SESSION['MM_UserGroup'] == 'y') {
header('Location: http://www.example.com/y.php');
exit;
}