From 3fb3df324eadd021d749c2d8526ca924e12c2529 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Lena?= Date: Mon, 9 Mar 2015 21:33:41 -0300 Subject: [PATCH 1/2] fixed session management and issue with schema being created every time it loads --- WP_Auth0.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/WP_Auth0.php b/WP_Auth0.php index ec87c846..c4c20bff 100644 --- a/WP_Auth0.php +++ b/WP_Auth0.php @@ -494,6 +494,7 @@ private static function login_user( $userinfo, $data ){ if (!is_null($user)) { // User exists! Log in self::updateAuth0Object($userinfo); + wp_set_auth_cookie( $user->ID ); return true; } else { @@ -573,13 +574,15 @@ public static function wp_init(){ //WP_Auth0_Options::set( 'version', 1 ); } - // Initialize session - if(!session_id()) { - session_start(); - } + // Initialize session. Disabled + //if(!session_id()) { + //session_start(); + //} } public static function end_session() { - session_destroy (); + if(session_id()) { + session_destroy (); + } } private static function setup_rewrites(){ @@ -644,7 +647,8 @@ private static function install_db(){ } public static function check_update() { - if ( get_site_option( 'auth0_db_version' ) !== AUTH0_DB_VERSION) { + + if ( get_option( 'auth0_db_version' ) != AUTH0_DB_VERSION) { self::install_db(); } } From e8f6c164681418cf81938af094b93bd6ee0574f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Lena?= Date: Mon, 9 Mar 2015 21:34:37 -0300 Subject: [PATCH 2/2] Updated plugin version --- WP_Auth0.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WP_Auth0.php b/WP_Auth0.php index c4c20bff..8ceb1cc2 100644 --- a/WP_Auth0.php +++ b/WP_Auth0.php @@ -2,7 +2,7 @@ /** * Plugin Name: Wordpress Auth0 Integration * Description: Implements the Auth0 Single Sign On solution into Wordpress - * Version: 1.1.7 + * Version: 1.1.8 * Author: Auth0 * Author URI: https://auth0.com */