close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

redirect user based on roleID

Thread began 3/11/2010 12:22 pm by msayler400767 | Last modified 5/24/2010 1:12 pm by Eric Mittman | 3088 views | 5 replies |

msayler400767

redirect user based on roleID

I have 1 login page; index.php. I have 4 levels of users. I would like each user to be redirected to their own home page based on their roleID. I cannot seem to find how this is done. Any help is appreciated.

Sign in to reply to this post

Eric Mittman

One way you could do this would be to store the page that you want the user to go to in the users record or in the user level record. Then in the authenticate user server behavior you could create a session variable based on the page for them and use this session variable as the redirect value for the login.

In the end this should allow the user to login, set the page they have listed as a session variable, then the redirect in the authenticate user server behavior will make use of this session variable to send the user to the correct location.

This is all higher level info, if you need some more details about any part of this post back with some specific questions that you have and I will help you with what I can.

Sign in to reply to this post

msayler400767

redirect user

Thank you! I used your suggestion and worked great.

Sign in to reply to this post

Eric Mittman

Nice to hear that, let us know if you have any further questions or if you encounter any issues.

Sign in to reply to this post

info407946

Redirect on level

I have a registration page that allows for four different "levels" or types of registration. Once you are registered, you can log in to the "admin" area; however, each "level" has a different admin area.

I'd like to be able to redirect each user to the specific admin area, (four different redirects) without having to have four different log in pages. I've tried to use session variables, but it is not working.

Each admin area, is restricted based on level as well.

Any one have any ideas?

Sign in to reply to this post

Eric Mittman

I think there are many ways you could handle this. If you have the page to redirect to stored on a per user basis then you should be able to store that location in a session variable and use that session variable as the redirect in the authenticate user server behavior.

If you do not have the info setup like this then you could use the same login page for all and store the user access level in a session variable. Then you can redirect to the highest level user page, on this page you can have a rule to check if the user is the highest level access. If they are then they have access to the page, if they are not then you should redirect them to the next highest access level's page. You can continue along until the user is at the correct page for their level.

Another way that you can do this is to have all the users redirect to a routing page that just has some auth rule checks for each of the levels. Each check would send the user to the correct page based on their level. If you can post back with a copy of each access rule that is applied to the pages I can show you more about this setup.

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