Reputation: 1153
Ive setup the following rule in Drupal:
NOT condition - Logged in user has his Profile created
DO condition - Redirect user to profile creation page
But I only want this rule to run, if the following is present in the URL.
user?destination=og%2Fsubscribe%2F67 ( this forwards users to the group after the register, o allow the to reqest a join)
The reason for wanting this, is because I also have logintoboggan setup, which forwards all new user to a specific page, after registration, which takes them through their setup. But I dont want users who have been asked to join a group, to follow this same procudure, which is why I have setup the rule. But unfortunatelly the rule overrides logintoboggan.
Which is why I want to somehow tell the rules module to only run this rule, when "user?destination=og" is present in the URL
Any help would be greatly appreciated
Upvotes: 1
Views: 2044
Reputation: 1797
Add a condition using a custom PHP statement.
return arg(0) == "user" && $_GET['destination'] == "og/subscribe/67';
If you want to check just whether og is in the destination, you could modify it to
return arg(0) == "user" && stripos($_GET['destination'], "og") !== FALSE;
Upvotes: 1