Safely changing UserID’s, re-using deleted UserID’s and automatically using deleted userID’s instead of an increment
Safely changing UserID’s, re-using deleted UserID’s and automatically using deleted userID’s instead of an increment
Safely changing UserID’s, re-using deleted UserID’s and automatically using deleted userID’s instead of an increment
HI please check below code. add_action( ‘user_register’, ‘fill_identity’, 10, 1 ); function fill_identity($user_id){ $current_user = get_userdata($user_id); $mail_user = $current_user->user_email; $mail_user = substr($mail_user,0,-14); $mail_user = explode(“.”, $mail_user); $prenom = $mail_user[0] = ucfirst($mail_user[0]); $nom = $mail_user[1] = ucfirst($mail_user[1]); var_dump($mail_user); wp_update_user(array( ‘ID’ => $current_user->ID, ‘first_name’ => $prenom, ‘last_name’ => $nom, )); }
Issues adding Recaptcha v3 to WordPress Registration
Solved the above task, posting the answer here so that someone can use the code I added this code in functions.php function is_user_video_perweek( $reg_days_ago ) { $currentuser = wp_get_current_user(); return ( isset( $currentuser->data->user_registered ) && strtotime( $currentuser->data->user_registered ) < strtotime( sprintf( ‘-%d days’, $reg_days_ago ) ) ); } and then in footer.php I called this … Read more
How to invalidate `password reset key` after being used
What would cause wp_insert_user role to work sporadically?
Add usermeta on Buddypress register
Ok, so we figured it. If you are using g suite – it requires SMTP plugin. We used the free one called WP MAIL SMTP and then contacted g suite support to configure it but this article gives a good answer to it as well: https://www.siteground.com/tutorials/wordpress/use-smtp/
Create a unique username with validation on wordpress registration
I’m not sure how WooCommerce adds these fields, but I suspect it uses add_user_meta after the user_register form or something. Try and catch it this way instead: if ( isset( $_POST[‘first_name’] ) ) { $first_name = $_POST[‘first_name’]; }