Skip to content

Commit abdb55b

Browse files
committed
Remove list id option on logout and display signup form only when we have list selected in settings.
1 parent 0e0e5f1 commit abdb55b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mailchimp.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ function mailchimp_sf_request_handler() {
217217
}
218218

219219
// erase auth information
220-
$options = array( 'mc_api_key', 'mailchimp_sf_access_token', 'mc_datacenter', 'mailchimp_sf_auth_error', 'mailchimp_sf_waiting_for_login', 'mc_sopresto_user', 'mc_sopresto_public_key', 'mc_sopresto_secret_key' );
220+
$options = array( 'mc_api_key', 'mailchimp_sf_access_token', 'mc_datacenter', 'mailchimp_sf_auth_error', 'mailchimp_sf_waiting_for_login', 'mc_sopresto_user', 'mc_sopresto_public_key', 'mc_sopresto_secret_key', 'mc_list_id' );
221221
mailchimp_sf_delete_options( $options );
222222
break;
223223
case 'change_form_settings':
@@ -1403,5 +1403,5 @@ function mailchimp_sf_get_access_token() {
14031403
* @return bool
14041404
*/
14051405
function mailchimp_sf_should_display_form() {
1406-
return mailchimp_sf_get_api() && ! get_option( 'mailchimp_sf_auth_error' );
1406+
return mailchimp_sf_get_api() && ! get_option( 'mailchimp_sf_auth_error' ) && get_option( 'mc_list_id' );
14071407
}

0 commit comments

Comments
 (0)