I have a page that shows content to all the users in my database but I have an specific username (exchangeStudents) and I want to show in the same page another view that filters the information for that account.

For example... my main page is: www.housing.com an when you login you can see www.housing.com/houses but I if you login as exchangeStudent you should be able to only see www.housing.com/exchange-houses

www.housing.com --> all users except exchangeStudent

www.housing.com/exchange-houses --> only for username: exchangeStudent

  • I think you may have a typo in the "www.housing.com --> all users except exchangeStudent" ... if www.housing.com is your "main" page, that sounds to me like your "homepage" also ... Could it be that you mean "www.housing.com/houses --> all users except exchangeStudent"? If not then please explain ... Aug 26, 2015 at 8:08

1 Answer 1


You can use login destination module, it is easy to use, you just need to create a rule where you can define after login specific role user can redirect to a specific page or you can use write php code too.

The Login Destination module allows you to customize the destination that a user is redirected to after logging in, registering to the site (7.x), using a one-time login link or logging out (7.x). The destination can be an internal page or an external URL. It is possible to specify certain conditions like referring pages or user roles and make the destination depend upon them. You may use PHP snippets to provide custom conditions and destinations. It is also possible to keep users on the currently visited page after logging in or out.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.