|
|
@ -24,17 +24,17 @@ function fulcrm_membership_optin_form_submit( $form, &$form_state ) {
|
|
|
|
$api2_data = fulcrm_apiv2_PATCH( $api_data[ 'data' ][ 'person' ][ 'url' ],
|
|
|
|
$api2_data = fulcrm_apiv2_PATCH( $api_data[ 'data' ][ 'person' ][ 'url' ],
|
|
|
|
$data = array( 'archived' => NULL ) );
|
|
|
|
$data = array( 'archived' => NULL ) );
|
|
|
|
if ( $api2_data[ 'success' ] ) {
|
|
|
|
if ( $api2_data[ 'success' ] ) {
|
|
|
|
drupal_set_message(t('Thank you! Your subscription to "%membership" has been confirmed.', array( '%membership' => $api_data[ 'data' ][ 'membership' ][ 'name' ] )), 'status', FALSE );
|
|
|
|
drupal_set_message( t('Thank you! Your subscription to "%membership" has been confirmed.', array( '%membership' => $api_data[ 'data' ][ 'membership' ][ 'name' ] )), 'status', FALSE );
|
|
|
|
drupal_goto( '<front>' );
|
|
|
|
drupal_goto( '<front>' );
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
drupal_set_message(t('There was a problem confirming your subscription.'), 'error', FALSE);
|
|
|
|
drupal_set_message( t('There was a problem confirming your subscription.'), 'error', FALSE );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
drupal_set_message(t('Thank you! Your subscription to "%membership" has been confirmed.', array( '%membership' => $api_data[ 'data' ][ 'membership' ][ 'name' ] )), 'status', FALSE );
|
|
|
|
drupal_set_message( t('Thank you! Your subscription to "%membership" has been confirmed.', array( '%membership' => $api_data[ 'data' ][ 'membership' ][ 'name' ] )), 'status', FALSE );
|
|
|
|
drupal_goto( '<front>' );
|
|
|
|
drupal_goto( '<front>' );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
drupal_set_message(t('There was a problem confirming your subscription.'), 'error', FALSE);
|
|
|
|
drupal_set_message( t('There was a problem confirming your subscription.'), 'error', FALSE );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|