How to disallow user to register with a specific word in the username?

Following code should work for you, but I can not guarantee that because your form is so heavily (and badly) customized. I have tested it on not customized registration form and it worked just fine. function cyhorge_check_fields( $errors, $sanitized_user_login, $user_email ) { if ( preg_match(‘/(CyhorgeVH)/’, $sanitized_user_login ) ) { $errors->add( ‘username_error’, __( ‘<strong>ERROR</strong>: User contains … Read more

Redirect to a different page through registration, depending on page

Changing the function to the following works, as it checks to see if the form was submitted from the correct page: function my_foo_registration_redirect( $redirect_to) { if ($_SERVER[‘HTTP_REFERER’] !== get_the_permalink(1693)) { return $redirect_to; } $redirect_to = ‘/videoguide-startpakke’; return $redirect_to; } Thanks a lot for the super helpful comments! EDIT: Here’s a slightly more polished solution function … Read more

Where are people registering on my website?

My research: “By default, WordPress websites allow for user registrations from a specific link: http://www.example.com/wp-login.php?action=register. These spambots are programmed to go looking for that link to register fake users.” So, your first step is to change the login page from wp-login.php to something else. Unfortunately, this is not the easiest thing to do by yourself. … Read more

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