Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

drupal user login redirect

Tags:

drupal

hi i wrote a module for user page generation. After login the path goes to users/[user-name] and i want to customize it using my module. how to handle it?

like image 525
ArK Avatar asked Sep 08 '26 18:09

ArK


2 Answers

You can use Login Toboggan to set a login destination. There are a few modules available for login redirecting without having to code.

To customize the look and feel of the user profile page, you can implement that through a TPL with CSS, or you can use Views to create Content Panes in conjunction with Panels, and override the user/% profile view.

like image 80
Kevin Avatar answered Sep 12 '26 18:09

Kevin


With hook_form_alter you can create a submit handler for the login form, and in it set $form_state['redirect'] to where you want the user to be redirected to when the user logs in.

like image 25
googletorp Avatar answered Sep 12 '26 18:09

googletorp



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!