wordpress multisite, how to keep user on subdomain throughout registration process?

What @petermolnar suggested also redirects your users to the main site if they want to register (I’ve tested this but feel free to make use of it. It’s good practice). What you need is a registration/login/edit-profile plugin for the front end: http://www.cozmoslabs.com/1341-wordpress-profile-builder-a-front-end-user-registration-login-and-edit-profile-plugin/ It’s shortcode based so all you have to do is redirect your users … Read more

How can I be certain that a user has verified their email after registration?

I’ve tried a few different approaches for verifying the user’s email. For now, what I am doing is this: When a user first registers, set the user’s user_metadata ’email_not_verified’ to 1. add_action( ‘user_register’, ‘sc_user_email_not_verified’ ); function sc_user_email_not_verified( $user_id ) { update_user_meta( $user_id, ’email_not_verified’, 1 ); } Then, override the wp_new_user_notification function so that it adds … Read more

Difference between Option_Group and Option_Name in Register_Settings

The codex defines the function as: register_setting( $option_group, $option_name, $option_validate_function ); $option_group is settings group name. Use when displaying on a settings page for example $option_name is the database entry name $option_validate_function is the callback for this database entry/this option. Most codex tutorials use an array of data in one $option_name but that’s not required … Read more

Filter username field on registration for profanity and unwanted words

There are two very different hooks you can use, depending on the installation: wpmu_validate_user_signup for multi-site and registration_errors for single-site. The following untested code shows how to use them. You can tweak the array in user_name_is_forbidden() to your needs. Use regular expressions for the matches. // multi-site add_filter( ‘wpmu_validate_user_signup’, function( $result ) { // there … Read more

How do I create a password reset link?

After much research, I finally turned to examining the WordPress core file wp_login.php hoping that WP would show how they do it in a non-obtuse manner. From the information around line 331 (WP 4.6.1), I put together the following code. <?php global $gw_activate_template; extract( $gw_activate_template->result ); $url = is_multisite() ? get_blogaddress_by_id( (int) $blog_id ) : … Read more

User Without Email?

It’s possible, just no so easily via the Users page without some hackery. The WordPress API will let you insert users without email addresses, so a little custom plugin to accept a login name and password, and a call to wp_insert_user or wp_update_user should work for you. Unfortunately I don’t have time to code it … Read more

Google Apps login in wordpress

Use the plugin WordPress Social Login: http://wordpress.org/extend/plugins/wordpress-social-login/ Does exactly what you want except the user doesn’t actually have to type in their username and password if they are already logged in to Google Apps – they just click the Google icon and it will log them in to WordPress using Google Apps. And yes, you … Read more

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