Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions WP_Auth0.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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(){
Expand Down Expand Up @@ -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();
}
}
Expand Down