Skip to content

Comments

Making wp_signon errors visible to users.#39

Open
ryno1234 wants to merge 1 commit intorestrictcontentpro:masterfrom
ryno1234:patch-1
Open

Making wp_signon errors visible to users.#39
ryno1234 wants to merge 1 commit intorestrictcontentpro:masterfrom
ryno1234:patch-1

Conversation

@ryno1234
Copy link

Signon errors can occur in situations beyond just those generated from RC. We should be carrying those users forward to the UI.

Signon errors can occur in situations beyond just those generated from RC. We should be carrying those users forward to the UI.
) );

wp_safe_redirect( esc_url_raw( $redirect ) );
if( is_wp_error($wp_signon_result) ){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add spaces around the $wp_signon_result variable?

if( is_wp_error($wp_signon_result) ){
rc_errors()->add( 'wp_signin_error' , $wp_signon_result->get_error_message(), 'login' );
$errors = rc_errors()->get_error_messages();
}else{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a space between } and else ?


wp_safe_redirect( esc_url_raw( $redirect ) );
if( is_wp_error($wp_signon_result) ){
rc_errors()->add( 'wp_signin_error' , $wp_signon_result->get_error_message(), 'login' );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's set the error code to $wp_signon_result->get_error_code() instead of wp_signin_error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants