Double consents
-
Hi
I have consents: t1, t2, t3.
When I add consents during registration I have double consets in USERS section: https://www.screencast.com/t/HHY87NZFabhYThere is my code:
<?php $page_login = new_post_by_slug_shortcodes( 'login', 'page' ); $password_registration = new_get_option( '_tc_password_registration', 0 ); $gdpr_method = new_get_option( '_tc_gdpr_method', 0 ); if(isset( $_POST['user_login'] ) && isset( $_POST['user_email'] )){ $user_name = $_POST['user_login']; $user_email = $_POST['user_email']; if($password_registration == 1){ $password = $_POST['user_password']; } $user_id = username_exists( $user_name ); if ( !$user_id and email_exists($user_email) == false ) { if($password_registration == 0){ $password = wp_generate_password( $length=12, $include_standard_special_chars=false ); } $userdata = array( 'user_login' => $user_name, 'user_email' => $user_email, 'user_pass' => $password, ); $user_id = wp_insert_user( $userdata ); if($gdpr_method == 1){ GDPR::save_user_consent_on_registration( $user_id ); } new_new_user_notification($user_id, $password); ?> <div class="new-message"> <h3><?php esc_html_e( 'Registration complete. You can now', 'example' ); ?> <a href="<?php echo $page_login->guid; ?>"><?php echo __( 'login', 'example' ); ?></a></h3> </div> <?php } else { ?> <div class="new-message error"> <h3><?php esc_html_e( 'Username or email already exists.', 'example' ); ?></h3> </div> <?php } } ?>
Please help.
- The topic ‘Double consents’ is closed to new replies.