Make new users automatically approved
My mistake. I had Absolute Privacy plugin turned on and that was interfering.
My mistake. I had Absolute Privacy plugin turned on and that was interfering.
Since WordPress 3.0.0, the action to call is “signup_extra_fields” instead of “register_form”, so you should use: add_action( ‘signup_extra_fields’, ‘extended_register_form’ );
There are dozens of ways to achive this. While your approach might work for a low amount of users, it propably is too much work to deal with hundrets or even thousands of users. That’s why I would highly recommend an automated approach, where most of the user handling is done by WordPress. However, for … Read more
Assuming the data is saved in a database you could create a total count function. You will obviously need to work on the query as its impossible to answer without knowing what your database looks like. If you aren’t saving the data, then theres no chance your going to get this to work. Here is … Read more
I’m noticing a weird issue on a custom User Registration page I’m using in WordPress. It seems as if WordPress will only accept usernames with 16 characters (NO MORE, NO LESS). You can check the database description and you should see that the user_login column is varchar(60)… much, much greater than 16. I am not … Read more
First you need to add a hidden field to registration form which can hold the URL where you want to redirect the user post registration. Below code will help you for that: <?php add_action( ‘register_form’, ‘hiddern_redirect_url’ ); function hiddern_redirect_url() { ?> <input type=”hidden” name=”redir_post_register” value=”<?php echo get_site_url(); ?>” /> <?php } ?> Then, using woocommerce_registration_redirect … Read more
If you are using default WordPress registration form. But there are no “Email” field. OK but you can try below code. if ($pagenow==’wp-login.php’) { add_filter( ‘gettext’, ‘user_email_login_text’, 20, 3 ); function user_email_login_text( $translated_text, $text, $domain ){ if ($translated_text == ‘Email’) { $translated_text=”Email required field”; } return $translated_text; } }
the value of the checkbox wouldn’t be “checked” – it should equal whatever you put in the “value” attribute .. and i think you need an extra set of parentheses in the if statement for first_name to make sure your filter is firing you could try explicitly adding an error (with no validation checks) to … Read more
in case of wrong value, the function has to return the original value then try this : function email_validation($data, $option, $original_value) { if (null == $data) { add_settings_error( ‘requiredTextFieldEmpty’, ’empty’, ‘Notification Email cannot be empty’, ‘error’ ); return $original_value; } else { if (!is_email($data)){ add_settings_error( ‘requiredTextFieldEmpty’, ’empty’, ‘Notification Email is not valid email address’, ‘error’ … Read more
I found out what it was. I had an action hook for user_register on my functions.php. This action hook would automatically login the user after registration. After removing it, it worked. As requested, the hook was interfearing because I was already logged in. The hook would use wp_set_current_user($user_id); wp_set_auth_cookie($user_id); to log in after registration.