Skip to content

Commit

Permalink
Add a setting check for email linking [perrybutler#52]
Browse files Browse the repository at this point in the history
  • Loading branch information
Xtremefaith committed Aug 31, 2016
1 parent 5870f90 commit 5861216
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wp-oauth.php
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,8 @@ function wpoa_login_user($oauth_identity) {
$_SESSION["WPOA"]["USER_ID"] = $oauth_identity["id"];
// try to find a matching wordpress user for the now-authenticated user's oauth identity:
$matched_user = $this->wpoa_match_wordpress_user($oauth_identity);
// If user is not found by oauth identity, then attempt by email.
if ( !$matched_user ) {
// If user is not found by oauth identity, then attempt by email (if enabled).
if(get_option('wpoa_email_linking') && !$matched_user) {
$matched_user = $this->wpoa_match_wordpress_user_by_email($oauth_identity);
}
// handle the matched user if there is one:
Expand Down

0 comments on commit 5861216

Please sign in to comment.