Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

redirect user based on access level

New Here ,
Feb 17, 2010 Feb 17, 2010

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

TOPICS
Server side applications

Views

2.5K
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Feb 18, 2010 Feb 18, 2010

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:

...

Votes

Translate
LEGEND ,
Feb 18, 2010 Feb 18, 2010

Copy link to clipboard

Copied

LATEST

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;

}

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines