How we get the success messages

You can declare $success variable and use it to display success message as following. Declare $success variable and assign success message to it if user is registered successfully as following : $success=””; if ( ‘POST’ == $_SERVER[‘REQUEST_METHOD’] && !empty( $_POST[‘action’] ) && $_POST[‘action’] == ‘adduser’ ) { $user_pass = wp_generate_password(); $userdata = array( ‘user_login’ => … Read more

Insert Extra fields added in the front end registration form to DB

Why the downvotes for using user meta? That’s how I do it, I store all the extra profile stuff in wp_usermeta table by utilizing update_user_meta. <?php // first validate all $_POST data $validated = $this->validate_and_sanitize(); $username = $validated[‘uname’]; $password = $validated[‘pass’]; $email = $validated[’email’]; $new_user_id = wp_create_user($username, $password, $email); if ( is_wp_error($new_user_id) && array_key_exists(‘existing_user_login’, $new_user_id->errors)) … Read more

User registration add user ID?

You can’t add the ID at registration because there is no ID until after the user has registered. (See a possible way around this near the bottom). You could tack on the ID after the registration with the user_register hook. function add_ID_wpse_99390($a) { global $wpdb; $user = new WP_User($a); $wpdb->query(“UPDATE {$wpdb->users} SET user_login = CONCAT(user_login,’_’,ID) … Read more

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