Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
tlovett1 committed Dec 13, 2024
2 parents b0f8f4b + 59bbef0 commit 808ac83
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 10up-experience.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: 10up Experience
* Plugin URI: https://github.com/10up/10up-experience
* Description: The 10up Experience plugin configures WordPress to better protect and inform clients, aligned to 10up’s best practices.
* Version: 1.13.0
* Version: 1.13.1
* Author: 10up
* Author URI: https://10up.com
* License: GPLv2 or later
Expand All @@ -19,7 +19,7 @@

use YahnisElsts\PluginUpdateChecker\v5\PucFactory;

define( 'TENUP_EXPERIENCE_VERSION', '1.13.0' );
define( 'TENUP_EXPERIENCE_VERSION', '1.13.1' );
define( 'TENUP_EXPERIENCE_DIR', __DIR__ );
define( 'TENUP_EXPERIENCE_FILE', __FILE__ );

Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

All notable changes to this project will be documented in this file, per [the Keep a Changelog standard](http://keepachangelog.com/).

## [1.13.1] - 2024-12-12
* Fix SSO bug with @10up.com emails

## [1.13.0] - 2024-12-09

* Turn on Fueled SSO by default
Expand Down
10 changes: 10 additions & 0 deletions includes/classes/SSO/SSO.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,21 @@ public function process_client_login() {
$user_id = false;
$user = get_user_by( 'email', $email );

if ( ! $user ) {
$short_email = str_replace( '@get10up.com', '@10up.com', $email );
$user = get_user_by( 'email', $short_email );
}

if ( ! $user && preg_match( '#@fueled\.com$#i', $email ) ) {
// Check if fueled person had a 10up email
$old_10up_email = str_replace( '@fueled.com', '@get10up.com', $email );
$tenup_user = get_user_by( 'email', $old_10up_email );

if ( ! $tenup_user ) {
$old_10up_email = str_replace( '@fueled.com', '@10up.com', $email );
$tenup_user = get_user_by( 'email', $old_10up_email );
}

if ( $tenup_user ) {
// Turn off email change notification
add_filter( 'send_email_change_email', '__return_false' );
Expand Down

0 comments on commit 808ac83

Please sign in to comment.