Check if user had autologin & if so, logout
Based on the suggestion of @JacobPeattie to use a cookie, I’ve constructed following working solution for this question: /* LOGIN / LOGOUT */ /* — */ /* AUTOLOGIN */ if( isset($_GET[‘username’]) ) { $user = get_user_by(‘login’, $_GET[‘username’]); // Redirect URL // if ( !is_wp_error( $user ) ) { if ( in_array( ‘customer’, (array) $user->roles ) … Read more