One login for 3 WordPress installations with combined user table doesn’t work
One login for 3 WordPress installations with combined user table doesn’t work
One login for 3 WordPress installations with combined user table doesn’t work
Some crawlers/bots attempting to login with very good guesses. How?
Use this: if ( is_user_logged_in () ) { if ( is_page ( ‘A’ ) || is_page ( ‘B’ ) || is_page ( ‘C’ ) ) { wp_safe_redirect( home_url() ); } // If we don’t redirect, then will be in current page. No need to reload this page again. }
For individual sites go to the settings page and update the SITE URL and Address. For multisites / network installs I must enter enter it in the Network Settings Page or if it’s not there enter it manually in the wp_config.php page. I’m also making sure that any one that enters http instead of https … Read more
WordPress giving error when I log in after trying emergency.php
There is wp_loginout() which will get you a simple login/logout form, and that content is filterable with the loginout hook, but the “login-form page” (by which I think you mean wp-login.php) is mostly hard-coded. There are a lot of hook in there that might be enough to do what you want though– twenty-three hooks by … Read more
Add these two blocks of code to functions.php or make a plugin. Everything should be self explanatory with comments. You could also use jQuery Validate plugin to check username, password via ajax and have these 2 blocks of code for backup if user has disabled JS. These two blocks of code should cover all possible … Read more
You could use the user_register-hook, to replace the username with the mail-address right after the account has been created. It could be something like this (untested) in your functions.php: add_action( ‘user_register’, ‘wpse216787_mail_as_username’, 10, 1 ); function wpse216787_mail_as_username( $user_id ) { $email = get_the_author_meta( ‘user_email’, $user_id ); update_user_meta($user_id, ‘user_login’, $email ); }
Add your page slug in if condition too. function wpse_131562_redirect() { if (! is_user_logged_in() && (is_woocommerce() || is_cart() || is_checkout() || is_page(‘wordpress-pages’)) ) { // feel free to customize the following line to suit your needs wp_redirect(site_url(‘my-account/’)); exit; } } add_action(‘template_redirect’, ‘wpse_131562_redirect’);
I found that I was setting the default mime type for wp_mail_content_type to be text/html which according to the notes on the codex can cause this particular issue. I’ve removed the code from my functions file, and the registration email looks better, but (and I haven’t seen WordPress’s emails in a long time) still doesn’t … Read more