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
You can define actions and triggers in Drupal:
Action(admin/settings/actions) - Redirect to a specific page
Trigger (admin/build/trigger/user) - After user has logged in
Try this.
EDIT (see comments):
Create a small module to check on a user's login process what role he has and then redirect if neccesary. drupal_goto => redirect-function in drupal
hook_user =>triggers on user operations
And for the user's roles:
$vendor then holds a true/false value will decide to redirect or not.
If you don't know how to do this, just post here and I'll write the module for you. But this would be a good practice for writing future drupa modules for you perhaps. :)
There is more than one way to skin this cat... This is my preferred Drupal 7 method: