Plugin Directory

Changeset 2520259


Ignore:
Timestamp:
04/23/2021 08:37:42 AM (5 years ago)
Author:
antwerpes
Message:

Fix active session detecting by Wordpress Site Health

Location:
doccheck-login/tags/1.0.9
Files:
5 edited
1 copied

Legend:

Unmodified
Added
Removed
  • doccheck-login/tags/1.0.9/README.txt

    r2349143 r2520259  
    33Tags: DocCheck, login, medical, authentication, hcp, hwg, healthcare, OAuth2
    44Requires at least: 4.5
    5 Tested up to: 5.4.2
    6 Stable tag: 1.0.8
     5Tested up to: 5.7.1
     6Stable tag: 1.0.9
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    5050
    5151== Changelog ==
     52= 1.0.9 =
     53* Fix active session detecting by Wordpress Site Health
     54* Tested up to 5.7.1
     55
    5256= 1.0.8 =
    5357* Bug fix profession routing and profession access management
  • doccheck-login/tags/1.0.9/client/class-dcl-client.php

    r2349143 r2520259  
    3636     * Initialize the class and set its properties.
    3737     *
    38      * @param   string $plugin_name The name of the plugin.
    39      * @param   string $version The version of this plugin.
     38     * @param string $plugin_name The name of the plugin.
     39     * @param string $version The version of this plugin.
    4040     *
    4141     * @since   1.0.0
     
    4747        $this->plugin_name = $plugin_name;
    4848        $this->version     = $version;
     49
    4950    }
    5051
     
    235236    }
    236237
    237     public function register_my_session() {
    238         if ( ! session_id() ) {
    239             session_start();
    240         }
    241     }
    242 
    243238    /**
    244239     * "Login" DocCheck user.
     
    301296            );
    302297
    303 
     298            session_start();
    304299            // Success
    305300            // Received access token
     
    308303                $this->dcl_set_session_token( $response->access_token );
    309304
    310                 if ( ! session_id() ) {
    311                     session_start();
    312                 }
    313 
    314305                if ( $occupation_activated ) {
    315306                    if ( $occupation_profession_parent_id != null ) {
     
    327318                    }
    328319
    329 
     320                    session_write_close();
    330321                    if ( count( $occupations_routing ) > 0 ) {
    331322                        foreach ( $occupations_routing as $item ) {
     
    351342                // Remove parameters from URL
    352343                wp_redirect( $redirect_permalink );
     344
    353345                exit;
    354346            }
     
    378370        // If the nonce is okay, remove the logged in cookie
    379371        if ( wp_verify_nonce( $_REQUEST['dcl_logout_nonce'], 'dcl_logout_nonce' ) ) {
     372            session_start();
    380373            session_destroy();
    381374        }
     
    478471        $redirect_url = get_permalink();
    479472        $login_url    = $this->dcl_get_login_permalink( $redirect_url );
    480 
     473        session_start();
    481474        // Set redirect cookie
    482475        $this->dcl_set_session_redirect_url( $redirect_url );
    483 
     476        session_write_close();
    484477        wp_redirect( $login_url );
    485478    }
  • doccheck-login/tags/1.0.9/dc-login.php

    r2349143 r2520259  
    1919 * Plugin Name:       DocCheck Login
    2020 * Description:       The official DocCheck plug-in enables the authentication of certified healthcare professionals and facilitates the integration of the DocCheck login.
    21  * Version:           1.0.8
     21 * Version:           1.0.9
    2222 * Author:            antwerpes ag <[email protected]>
    2323 * Author URI:        https://antwerpes.com
  • doccheck-login/tags/1.0.9/includes/class-dcl-base.php

    r2340836 r2520259  
    302302    public function dcl_start_session() {
    303303        if ( ! isset( $_SESSION ) ) {
    304             session_set_cookie_params( 86400 );
    305304            session_start();
     305            session_write_close();
    306306        }
    307307    }
  • doccheck-login/tags/1.0.9/includes/class-dcl.php

    r2349143 r2520259  
    6666
    6767        $this->plugin_name = 'dc-login';
    68         $this->version     = '1.0.8';
     68        $this->version     = '1.0.9';
    6969
    7070        $this->set_loader();
     
    160160
    161161        $this->loader->add_action( 'init', $plugin_public, 'dcl_start_session' );
    162         $this->loader->add_action( 'init', $plugin_public, 'register_my_session' );
    163162        $this->loader->add_action( 'pre_get_posts', $plugin_public, 'dcl_filter_search_results' );
    164163        $this->loader->add_filter( 'wp_get_nav_menu_items', $plugin_public, 'dcl_filter_menus' );
Note: See TracChangeset for help on using the changeset viewer.