Prevent registration except through form

I found a good answer and slightly modified it on a related question . It uses htaccess, and redirects any requests to wp-login.php?action=register. # BLOCK SPAM REGISTRATION REQUESTS (wp-login.php?action=register) <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{THE_REQUEST} ^.*(wp-login.php\?action=register).* [NC] RewriteRule ^(.*)$ http://isoreiki.com/about/account </IfModule> Notes: In the answer I linked to he totally blocked these requests. However I … Read more

User Registration – no Email required

Just install a plugin called – Snippets & Activate. Than on left panel click Snippets -> Add new. Type a title of your own & paste below code. After that click a option there in the bottom “Run snippet everywhere” and press Save/Active. That’s all you need to do. Enjoy… add_action(‘user_profile_update_errors’, ‘my_user_profile_update_errors’, 10, 3); function … Read more

Registration form not registering First and Last name

You’re not handling the names the same way as the other fields: //// VERIFIES CREDENTIALS $username = isset($_POST[‘username’]) ? trim($_POST[‘username’]) : ”; $first_name = isset($fields[‘user_first_name’]) ? sanitize_text_field(trim($fields[‘user_first_name’])) : ”; $last_name = isset($fields[‘user_last_name’]) ? sanitize_text_field(trim($fields[‘user_last_name’])) : ”; $email = isset($_POST[’email’]) ? trim($_POST[’email’]) : ”; Notice how you use $_POST[’email’] and $_POST[‘username’], but then you use $fields[‘user_last_name’], … Read more

generate an auto incremented id number when a new user is registered

You can use the same method as described in the link you mentioned, but simply use the created user ID and add 1000 so you get four digits. So user_id = 5 gets the meta number of 1005. add_action( ‘user_register’, ‘my_on_user_register’ ); function my_on_user_register( $user_id ) { $unique_id = 1000 + $user_id; update_user_meta( $user_id, ‘my_unique_id’, … Read more

How to generate Registration no

Add this in functions.php This will automatically add a custom field to a user when they register on your site with a key of: user_registration_no add_action(‘user_register’, ‘add_user_registration_number’); function add_user_registration_number ($user_id) { $reg_number = date(‘y’).date(‘m’).’SY’.’0′.$user_id; update_user_meta($user_id, ‘user_registration_no’, $reg_number); } This should be formatted in the way in which you specified..

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