Skip to content

Commit

Permalink
Merge branch 'new-user-hooks' of https://github.com/Frique/social-con…
Browse files Browse the repository at this point in the history
…nect into Frique-new-user-hooks

Conflicts:
	social-connect.php
  • Loading branch information
rodrigoprimo committed Aug 8, 2014
2 parents 8957a77 + 1bb236e commit 8568299
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion social-connect.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ function sc_social_connect_process_login( $is_ajax = false ) {
$userdata = array( 'user_login' => $user_login, 'user_email' => $sc_email, 'first_name' => $sc_first_name, 'last_name' => $sc_last_name, 'user_url' => $sc_profile_url, 'user_pass' => wp_generate_password() );

// Create a new user
$user_id = wp_insert_user( $userdata );
$user_id = wp_insert_user( apply_filters( 'social_connect_insert_user', $userdata ) );

if ( $user_id && is_integer( $user_id ) ) {
update_user_meta( $user_id, $sc_provider_identity_key, $sc_provider_identity );
Expand All @@ -221,6 +221,7 @@ function sc_social_connect_process_login( $is_ajax = false ) {
if( isset( $sc_avatar ) && $sc_avatar ){
update_user_meta( $user_id, 'social_connect_twitter_avatar', $sc_avatar );
}
do_action( 'social_connect_inserted_user', $user_id, $social_connect_provider );
} else {
add_filter( 'wp_login_errors', 'sc_login_errors' );

Expand Down

0 comments on commit 8568299

Please sign in to comment.