Closed (fixed)
Project:
Invite
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
20 Feb 2009 at 18:44 UTC
Updated:
14 Nov 2011 at 23:28 UTC
At line 1092 of the invite.module, there is
// Everything went well: redirect to pending invites page.
$form_state['redirect'] = "user/$user->uid/invites/pending";
My question is, rather than sending the user to that /user/[uid]/invites/pending page upon successfully sending the invite, might it be possible to send them back to whatever page they were on before they went to the /invite page?
This would make the flow like
1) user goes to page with link to /invite page
2) user clicks link to /invite page
3) user sends an invite
4) user is redirected back to the page they were on before clicking the link
Comments
Comment #1
chousmith commentednevermind, just had to change the link href on my end to /invite?destination=<?php echo drupal_get_path_alias($_GET['q']); ?>
Comment #2
mattcasey commentedFor others who find this page looking for a way to redirect the invite form:
Drop this in a module to fix the redirect for everyone including admin:
(In our case, the pending requests are on the same page as the invite form).