Redirect to member dashboard after updating CC info.
authorDavid Thompson <davet@gnu.org>
Thu, 5 Feb 2015 14:25:19 +0000 (09:25 -0500)
committerDavid Thompson <davet@gnu.org>
Thu, 5 Feb 2015 14:25:19 +0000 (09:25 -0500)
* memberdashboard.php (memberdashboard_civicrm_postProcess): New function.

memberdashboard.php

index 66686b4c8606fa3081ce368f7c60d320c8cedc6f..34bcddf2548269ec4e49a44ee55b9afb1f90a86f 100644 (file)
@@ -176,3 +176,14 @@ function memberdashboard_civicrm_buildForm($formName, &$form) {
     }
   }
 }
+
+function memberdashboard_civicrm_postProcess($formName, &$form) {
+  // Redirect to Member Dashboard after updating billing info.  The
+  // default behavior is to go to the standard CiviCRM dashboard,
+  // which is undesirable.
+  if($formName == 'CRM_Contribute_Form_UpdateBilling') {
+    CRM_Utils_System::redirect(CRM_Utils_System::url(
+      'civicrm/member-dashboard'
+    ));
+  }
+}