Tutorial 1: On login redirect to the user's account page
Last modified: December 5, 2008 - 19:31
The first short tutorial will show how workflow-ng can be used to configure a simple page redirection after a user has logged in.
As an alternative, one can just import the ready configuration from here.
1. Create a new configuration
First we have to start a new configuration.
- Go into the workflow-ng admin center and click on the tab "Add new configuration".
- Select the event "User has logged in", set the label "On login redirect to account page"
- Click "Submit".
Now we have created a new configuration, which is still empty. All conditions and actions that we add to this configuration will be evaluated on the event "User has logged in".
2. Create the redirection action
- Click on the "Add an action" link, select the action "Page redirect" and click submit. The "Page redirect" action makes use of token replacements, which allow us to place the user's id in the redirect path.
- Call the action "Redirect to the users account page".
- If you have Clean URLs enabled, set the path to "user/[account:uid]", without the "".
- If you don't have Clean URLs enabled (if you have "?q=" in your site's URLs) then set the path to "?q=user/[account:uid]", without the "".
- Then activate the checkbox "Force redirecting to the given path, even if a destination paramter is given" - which is necessary, because Drupal always sets a destination parameter to the current page if a user logs in. We need to activate this so that our redirection applies. Check the option.
- Submit the form.
That's all. Just log out and log in again - you'll be redirected... :)
