Drupal - After each user login, how can I redirect to a user-specific page?
What we need: redir开发者_StackOverflow社区ect to each user's specific page after their login.
What we have tried:
Login Toboggan module: can be direct to each user's profile page, however we do not where to define specific node, i.e node 15 for user David. If you have experience on this, please advise.
Nodeacccess: generic access control defined to each content type.
Any other suggestions?
I'd recommed the Login Destination module. You can use PHP to set specific nodes to redirect to per user. The documentation on that page is pretty clear, but in case you need some more help, your PHP snippet will end up looking something like:
global $user;
switch $user->uid {
case '1': //for user 1
return 'node/1'; //to redirect to node #1
case '2': //for user 2
return 'node/10'; //to redirect to node #10
// and so on...
}
Hope that helps!
EDIT: Just found this, might be helpful.
Nah, triggered rules have this built in.
Select condition when user logs in, select action direct user to page, done.
Try using Login Destination Module.
精彩评论