phpsword / sword-bundle

Modern WordPress development with Symfony
https://getsword.com
MIT License
125 stars 4 forks source link

GravityForms login issue #42

Open aroberts91 opened 5 months ago

aroberts91 commented 5 months ago

I believe the Authentication logic may be causing a problem with Gravity forms user registration. The GF plugin checks for login errors before running some additional logic:

class-gf-user-registration.php @2495:

$sign_on = wp_signon(
                array(
                    'user_login'    => $field_values['1'],
                    'user_password' => $field_values['2'],
                    'remember'      => $field_values['3_1'] == '1' ? true : false
                )
            );

            if ( is_wp_error( $sign_on ) ) {
            ...

However, the logic never makes it past wp_signon because the UserAuthenticator throws an exception (WordpressLoginSuccessfulException) on success. This causes required filters to fail even though the user is logged in successfully.

Is there a workaround for this or can there be some solution?