Skip to content

Commit

Permalink
Remove set_connection usage
Browse files Browse the repository at this point in the history
  • Loading branch information
joshcanhelp committed Jul 18, 2018
1 parent 3bdcf55 commit 0b344ca
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions lib/WP_Auth0_Api_Operations.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ public function create_wordpress_connection( $app_token, $migration_enabled, $pa
}

/**
* TODO: Deprecate, not used anywhere
*
* This function will sync and update the connection setting with auth0
* First it checks if there is any connection with this strategy enabled for the app.
* - If exists, it checks if it has the facebook keys, in this case will ignore WP setting and will update the WP settings
Expand Down
3 changes: 3 additions & 0 deletions lib/WP_Auth0_Options.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ public function is_wp_registration_enabled() {
return is_multisite() ? users_can_register_#_filter() : get_site_option( 'users_can_register' );
}

/**
* TODO: Deprecate
*/
public function set_connection( $key, $value ) {
$options = $this->get_options();
$options['connections'][ $key ] = $value;
Expand Down
4 changes: 0 additions & 4 deletions lib/initial-setup/WP_Auth0_InitialSetup_Consent.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,6 @@ public function consent_callback( $name ) {
$enabled_clients = array_diff( $connection->enabled_clients, array( $client_id ) );
WP_Auth0_Api_Client::update_connection( $domain, $app_token, $connection->id, array( 'enabled_clients' => array_values( $enabled_clients ) ) );
}
} elseif ( $connection->strategy !== 'auth0' ) {
$this->a0_options->set_connection( "social_{$connection->name}", 1 );
$this->a0_options->set_connection( "social_{$connection->name}_key", isset( $connection->options->client_id ) ? $connection->options->client_id : null );
$this->a0_options->set_connection( "social_{$connection->name}_secret", isset( $connection->options->client_secret ) ? $connection->options->client_secret : null );
}
}
}
Expand Down

0 comments on commit 0b344ca

Please # to comment.