Allow Duplicate Email Address for Different Users

Unfortunately, this just isn’t possible. There are three occasions where WordPress performs this check: When you click ‘save’ on the edit user screen( https://github.com/WordPress/WordPress/blob/master/wp-admin/includes/user.php#L157 ) When a user is registered ( https://github.com/WordPress/WordPress/blob/master/wp-includes/user.php#L2023 ) When a user is created/inserted into the dtabase ( https://github.com/WordPress/WordPress/blob/master/wp-includes/user.php#L1610 ) Both (1) and (2) have hooks after them which allow you … Read more

How to add first name & last name to default registration form?

Add this code in functions.php add_action( ‘register_form’, ‘myplugin_register_form’ ); function myplugin_register_form() { $first_name = ( ! empty( $_POST[‘first_name’] ) ) ? trim( $_POST[‘first_name’] ) : ”; $last_name = ( ! empty( $_POST[‘last_name’] ) ) ? trim( $_POST[‘last_name’] ) : ”; ?> <p> <label for=”first_name”><?php _e( ‘First Name’, ‘mydomain’ ) ?><br /> <input type=”text” name=”first_name” id=”first_name” … Read more

How to display custom user meta from registration in backend?

Actually I found this to be more strait forward and simpler: //add columns to User panel list page function add_user_columns($column) { $column[‘address’] = ‘Street Address’; $column[‘zipcode’] = ‘Zip Code’; return $column; } add_filter( ‘manage_users_columns’, ‘add_user_columns’ ); //add the data function add_user_column_data( $val, $column_name, $user_id ) { $user = get_userdata($user_id); switch ($column_name) { case ‘address’ : … Read more

Custom admin email for new user registration

Yes, you can Change email address by using wp_mail function. You can check this how to do this http://www.butlerblog.com/2011/07/14/changing-the-wp_mail-from-address-with-a-plugin/ Use this plugin for user management it supports email address when new user registers https://wordpress.org/plugins/wp-members/ Use this code in your functions.php file. function so174837_registration_email_alert( $user_id ) { $user = get_userdata( $user_id ); $email = $user->user_email; $message … Read more

How to let user set password on registration

Its Not has hard as you think it is 🙂 Add the password fields to your form : password: <input type=”password” name=”pass1″ style=”width:250px; margin-bottom:3px;”><br /> repeat password: <input type=”password” name=”pass2″ style=”width:250px; margin-bottom:3px;”><br /> then in your if($_POST){ replace this line: $random_password = wp_generate_password( 12, false ); with this: $pass1 = $wpdb->escape($_REQUEST[‘pass1’]); $pass2 = $wpdb->escape($_REQUEST[‘pass2’]); if … Read more

Create posts on user registration

You kind of answered the question yourself already, Create a function that will create the 3 posts ex: function create_new_user_posts($user_id){ if (!$user_id>0) return; //here we know the user has been created so to create //3 posts we call wp_insert_post 3 times. // Create post object $my_bio_post = array( ‘post_title’ => ‘bio’, ‘post_content’ => ‘This is … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)