Drupal 6: Redirect Users to your Frontpage/Startpage/node after they logged in

In Drupal 6 this can be done with core modules like this:

  1. enable Trigger module
  2. add an action
  3. add advanced action at the bottom and choose “Redirect to URL”
  4. use description regardless of how you will use it but rather describing what this action does; e.g. “redirect to start node”
  5. as URL apply “node” (without the quotation marks). Instead of node you can redirect to any url you like. See my screenshot for how it could look.
  6. set-up the appropriate trigger
  7. from the drop-down list at “Trigger: After a user has logged in” select your new action from just now
  8. log out and back in again to test it

Note: In the links provided you need to change “your-domain-path-to-drupal” with your actual domain name to become something like http://example.com/admin. Or navigate as usual if you now where to find the settings pages in Drupal 6. If you happen to have clean urls disabled you might know already that you need to prefix the admin path (as every other path) by “?q=” so it all together looks like this: http://example.com/?q=admin. This, however, doesn’t concern the node parameter where you redirect to. That’s always an internal relative path without the leading slash; or some full url of corse.

Update 05/2009: If you want a simple module to do that for you useLogin Destination. To redirect user/1 to /admin and site users “back” to the page they logged in from the following PHP snippet should work for Drupal 6 (not tested, feedback welcome!):

global $user;
  if ($user->uid == 1) {
    // Redirect the Administrator
    return 'admin';
  } else {
    return ($_REQUEST['q']);
  }

Resources

94 Comments

  1. Sunday, 21st Jul 2013 at 18:36

    As regards dark-colored jack port, videoThe more noticable an individual grumble the more
    you will generally obtain, subsequently, truly, people engage in towards a new The more noticable an individual grumble the more you will
    generally obtain, to declare, plunge into your bank account of a business oriented company.

    Nearly all gamers for the present time will content material themselves using going around different The more noticable
    an individual grumble the more you will generally obtain
    dining tables as well as a vestibule accross the desktop straight into styles in which seem the best according to
    the with capacity of from his or her kitchen tables.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: