Index: invite.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/invite/invite.module,v
retrieving revision 1.25
diff -u -p -r1.25 invite.module
--- invite.module	2 Sep 2008 17:02:14 -0000	1.25
+++ invite.module	12 Jun 2009 15:34:32 -0000
@@ -1186,10 +1186,14 @@ function invite_cancel($origin, $code) {
       );
       $description = (!$invite->joined && $invite->expiry > time()) ? t("The invitee won't be able to register any more using this invitation.") : '';
 
+      $dest = "user/$user->uid/invites/{$origin}";
+      if (isset($_GET['destination'])) {
+        $dest = $_GET['destination'];
+      }
       return confirm_form(
         $form,
         t('Are you sure you want to withdraw the invitation to %email?', array('%email' => $invite->email)),
-        "user/$user->uid/invites/{$origin}",
+        $dest,
         $description .' '. t('This action cannot be undone.'),
         t('Withdraw'),
         t('Cancel')
