gianism_google_login_allowed
gianism_google_login_allowed
Appears in: gianism.6.0.0
Hook Type: filter
See hook in action
Displaying hooks found in version: gianism.6.0.0apply_filters('gianism_google_login_allowed') is found 2 times:
- /app/Gianism/Service/Google.php line 160
* @param bool $allowed Whether login is allowed. Default true. * @param string $email User's email address. * @param \Google_Service_Oauth2_Userinfoplus $profile User's profile data from Google. */ $allowed = apply_filters( 'gianism_google_login_allowed', true, $email, $profile ); if ( ! $allowed ) { throw new \Exception( __( 'You are not allowed to login to this site.', 'wp-gianism' ) ); } $plus_id = isset( $profile['id'] ) ? $profile['id'] : 0; $user_id = $this->get_meta_owner( $this->umeta_account, $email ); if ( ! $user_id ) { - /app/Gianism/Service/Google.php line 232
} // Check if other user has these as meta_value $email = $profile['email']; /** This filter is documented in app/Gianism/Service/Google.php */ $allowed = apply_filters( 'gianism_google_login_allowed', true, $email, $profile ); if ( ! $allowed ) { throw new \Exception( __( 'You are not allowed to connect this account.', 'wp-gianism' ) ); } $email_owner = $this->get_meta_owner( $this->umeta_account, $email ); if ( $email_owner && ( get_current_user_id() !== $email_owner ) ) { throw new \Exception( $this->duplicate_account_string() );