Profile picture for user admin
Daniel Sipos
23 Jan 2013

Login Destination is one of those simple Drupal modules that help with a very specific requirement. It allows for configuring some light rules that redirect the user to a custom location after logging in, registering for an account or logging out.

The module very well exemplifies the Drupal saying: there’s a module for that. And more so, puts the saying easily into a conversation with your client:

  • Client: '...but I want the user to be redirected to my cupcake gallery after logging in'
  • You: 'it’s ok, there’s a module for that.'

So to use it, you have to install it like any module and go to its configuration page: admin/config/people/login-destination. There you can add multiple login destination rules that require some minimal configuration.

Add a rule and immediately you’ll see a text box where you have to put the internal or external destination URL to be used by this rule. Next, you select the triggers for the redirect: login, registration, one-time login link and logout or all of them together. Moreover, you can select a condition: the page the user is currently on when performing the said actions.

To top it all off, you can further narrow the rule down by selecting which permission role the user must have in order to be redirected. This will allow you to create various behaviours for the different user categories you may have. So that’s pretty much it you have to do.

If you’re a fan of video learning, there is an episode of the Daily Dose of Drupal dedicated to this module. I recommend you check it out.

Hope this helps.

Profile picture for user admin

Daniel Sipos

CEO @ Web Omelette

Danny founded WEBOMELETTE in 2012 as a passion project, mostly writing about Drupal problems he faced day to day, as well as about new technologies and things that he thought other developers would find useful. Now he now manages a team of developers and designers, delivering quality products that make businesses successful.

Contact us

Comments

NikLP 23 Jan 2013 11:35

.

Naturally, you can achieve this task with Rules very effectively and flexibly, so if you're already tied to using that, you won't have need for the above module as well. Otherwise, sounds good! :)

Kevin Coyle 23 Jan 2013 18:44

Rules Module

I realise this module would be great for someone that wants a light weight solution but wouldn't the Rules module do this without breaking a sweat?

E15BAER 23 Jan 2013 19:06

The r4032login module solved

The r4032login module solved my problem of returning anonymous users a restricted page after logging in. It was also able to preserve entityreference_prepopulate values when logging in to complete a node/form submission. Login Destination may be able to do similar, but I was not able to get it to preserve the entityreference_prepopulate values from the url.

Add new comment