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?
To redirect users to a specific page after login, you can simply add the redirect URL parameter in login form Shortcode. The redirect_url parameter allows you to redirect to a certain page after the user is logged in.
Setting Up Login Redirect by User Role in WordPress Simply click the 'Add New' button in the 'Redirection Rules' section. Then, select the 'User Role' condition from the 'Rule Condition' drop down and choose the user role from the drop down list.
WP Login and Logout RedirectUpon installation, you'll find the new Redirect Options menu in your sidebar. Click it, and you'll see two boxes: Login Redirect URL and Logout Redirect URL. Put the URL you want in and click Save Changes, and you're done. Redirect options in the WP Login and Logout Redirect plugin.
There is more than one way to skin this cat... This is my preferred Drupal 7 method:
function hook_user_login(&$edit, $account) {
$edit['redirect'] = 'node/123';
}
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!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With