Making WordPress.org


Ignore:
Timestamp:
02/26/2018 12:26:40 PM (7 years ago)
Author:
dd32
Message:

2FA: Have WPORG_Two_Factor_Email be it's own provider in it's own right.

By extending WPORG_Two_Factor_Email for WPORG_Two_Factor_Slack it was found that Two_Factor_Email uses self:: a bunch causing the usermeta token override not to take effect.

See #77.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-two-factor/providers/class-wporg-two-factor-slack.php

    r6760 r6761  
    55class WPORG_Two_Factor_Slack extends WPORG_Two_Factor_Email {
    66
    7     /**
    8      * The user meta token key.
    9      *
    10      * @type string
    11      */
    127    const TOKEN_META_KEY = '_two_factor_slack_token';
    138
    14     /**
    15      * Ensures only one instance of this class exists in memory at any one time.
    16      *
    17      * @since 0.1-dev
    18      */
    19     static function get_instance() {
     9    public static function get_instance() {
    2010        static $instance;
    21         $class = __CLASS__;
    22         if ( ! is_a( $instance, $class ) ) {
     11        if ( ! $instance ) {
     12            $class = __CLASS__;
    2313            $instance = new $class;
    2414        }
Note: See TracChangeset for help on using the changeset viewer.