WordPress to use Drupal users’ credentials
Personally, I’d use the hook Register Form (run at the end of the default rego form) to capture the data then POST the data to a Drupal page and/or run the mysql query ond the Drupal database.
Personally, I’d use the hook Register Form (run at the end of the default rego form) to capture the data then POST the data to a Drupal page and/or run the mysql query ond the Drupal database.
It works on a standard profile page (your profile / Profile) without other plugins installed. Other plugins may affect the overall result. I think code can be improved, if some one knows how please give it a go. function better_profile_page($buffer) { global $pagenow; if ($pagenow == ‘profile.php’ || $pagenow == ‘users.php’ || $pagenow == ‘user-edit.php’) … Read more
You can use wp_insert_user. Since your old database has passwords in base64, you can easily get the original password string using base64_decode. $new_user_data = array( ‘user_pass’ => ‘password’,//pass your decoded password string ‘user_login’ => ‘username’,//pass your username ‘user_email’ => ’email’, ‘first_name’ => ‘firstname’, ‘last_name’ => ‘lastname’, ‘role’ => ‘author’//if you want to specify a different … Read more
Taken directly form the wp_delete_user documentation: if(is_user_logged_in() && !empty($_GET[‘DeleteMyAccount’])) { add_action(‘init’, ‘remove_logged_in_user’); } function remove_logged_in_user() { require_once(ABSPATH.’wp-admin/includes/user.php’ ); $current_user = wp_get_current_user(); wp_delete_user( $current_user->ID ); } Things to note: Your code didn’t check if the user was logged in or not by the time you’re printing the remove user link, the init action has already happened … Read more
How about trying the WP-United plugin? It seems to do what you want: User integration: including single sign-on, synchronised profiles and avatars, and user management. Works with external registration modules such as social login plugins. Users in phpBB get accounts in WordPress and vice versa. Completely controllable and customisable by setting permissions for who can … Read more
Run a couple of queries and a code snippet to calculate the word count for the post content, comments content and tag names on each post. // This query will return the number of words in the post content $post_qry=”SELECT LENGTH(post_content) – LENGTH(REPLACE(post_content, ‘ ‘, ”))+1 from wp_posts where ID=”.$post_id; // This query will return … Read more
Gravatar by design doesn’t require the downstream system to be aware if there is a match. The image (if any) is determined and served on request, only hash needs to be provided. It’s impossible to “guess” from email or its hash if it has an avatar. That can only be resolved by request to the … Read more
In a plugin, you can create the users with whatever information you want them to have (First name, last name, etc). The only required user fields are username, email and password, which you can specify. https://codex.wordpress.org/Function_Reference/wp_create_user As Ahmed Mahdi stated above, you can create the users but not send them the login information.
Ok so I think I found a solution and wanted to post in case this is an issue for anyone else. I decided to forgo trying to create a custom default avatar through buddypress specifically, which means I’m no longer talking about using the bp-custom.php file. Instead I’ve opted to create a custom gravatar option … Read more
WordPress 4.9.0 introduced 2 filters into the new user notification mail function (wp_new_user_notification): wp_new_user_notification_email – to customise the email sent to User wp_new_user_notification_email_admin – to customise the email email sent to Admin We can ignore the second as this is the email sent to the admin the format is different from that in your question. … Read more