Skip to content

Commit

Permalink
Migrate application_password but don't delete it just in case
Browse files Browse the repository at this point in the history
  • Loading branch information
Luc45 committed Jan 26, 2024
1 parent 7a7b233 commit c57e9b6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/src/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ public function __construct( Environment $environment ) {
*/
public function get_partner_auth() {
// Migrate "application_password" to "qit_token" if it exists.
if ( ! empty( $this->environment->get_cache()->get( 'application_password' ) ) ) {
if ( empty( $this->environment->get_cache()->get( 'qit_token' ) ) && ! empty( $this->environment->get_cache()->get( 'application_password' ) ) ) {
$this->environment->get_cache()->set( 'qit_token', $this->environment->get_cache()->get( 'application_password' ), - 1 );
$this->environment->get_cache()->delete( 'application_password' );
}

$user = $this->environment->get_cache()->get( 'user' );
Expand Down

0 comments on commit c57e9b6

Please sign in to comment.