We have certain users in our member list that have a role "vendor" attached to them. All such members are to be redirected to a certain page upon login. How can this be accomplished?
相关问题
- Drupal 8: How do I customize a form widget to show
- drupal :: order complete hook and upgrade user per
- Change redirect in Drupal 7 for Password Recovery
- Adding attachment to Jira's api
- How do I stop drupal from creating a different con
相关文章
- Render a Drupal node
- How to allow multiple blocks in a module of Drupal
- How can I redirect a Drupal user after they create
- Drupal 6: Getting custom fields into the database
- Drupal 7 retain file upload
- Drupal - Set 'user/%/edit/uprofile' to def
- Drupal Session User id for independent script
- Drupal - Replace the home page
following condition for hook_user
You can use Rules
Events: User has logged in.
Condition: User has role
Actions: Page redirect
There are modules that do this (besides Trigger+Actions), such as LoginDestination: http://drupal.org/project/login_destination. This Drupal forum post has a bit more info about it as well.
For Drupal 7
Action --> admin/config/system/actions - Redirect to URL
then enable your trigger module
Trigger --> /admin/structure/trigger/node
if your are trying to login redirect just follow this(select user tab in the page)
go to --> admin/structure/trigger/user
then Trigger: After a user has logged in
choose an action -->Redirect to URL and assign.
Then clear the cache.
It will work for you!
There are 2 ways in DRUPAL 7
1) Using action and trigger see this http://drupal.org/node/298506
2)if using custom module
This can be achieved by using a combination of content access and login toboggan modules. You'll be able to restrict pages and prompt user to login to access them.