Add new users to "add new user" page on admin's dashboard

I understand there's a lot of similar questions, but all of them show how to update the wp_usermeta table in the database, whereas I want to use wp_update_user() to update a particular field (nickname <-> user_nicename) in the wp_users table. Here is my snippet, (which I have collected from other similar questions) it appends the new field to the "add new user" page, but it doesn't save the information in the database with wp_update_user(). P.S.: I also would like to …
Category: Web

I want to disable E-Mail verifcation / activation when a user signs up for my Wordpress site

when a new user registers an activation link is sent to his e-mail account. I want the user to enter his username, email address and password and straight register and be logged in without confirmation (confirmation does not prevent spam bots from signing up for the site, I don't care about it really!) is there a way to do it?
Category: Web

Restrict user registration to emails on a single domain

I need to allow user registrations only for those with email addresses on a single domain. I have tested multiple regular expressions and this one works well in a regex sandbox environment, but as soon as I put it into my functions.php file, it simply rejects all registrations - even email addresses on the correct domain (with the error message below, so it's definitely this conditional that's breaking it). Am I: a) actually doing something stupid in the regex, even …
Category: Web

Impossible to create a new WooCommerce customer using Rest API

On my website I have created a register page in react and I am using Wordpress headless with WooCommerce on it. So I was expecting to create a new user using the register page i have and as the Wordpress side is by default set to create a 'Customer" user type for any new registration. The registration is partially working. Let me explaining. To achieve the registration I have done this: On wordpress, I have installed the plugin : WP …
Category: Web

User with same Mail but a different additional info(like domain)

I know this is not the way u should go, but my customers want it so im looking for ways. Requirement: WP with one DB (3 Domains sale the same stuff) 3 Domains which use this DB (can be more later), this should work with on fly rewriting over hooks user registered should be only able to login in the domain where he is registered, but should be able to register on the other 2 domains with same data. My …
Category: Web

Disable emails for new user registration

I want to disable the default email that is send when user is registered. I am using this plugin for email verification User Verification By PickPlugins, which sends an email with confirmation link, but the problem is that by default and WordPress send an email via pluggable.php: function wp_new_user_notification( $user_id, $deprecated = null, $notify = '' ){...} I am using a theme (which I am extending with a child theme), which calls wp_create_user. I have replaced that parent theme function …
Category: Web

User Without Email?

When creating a user in Wordpress an email address is required for that user. The website I'm working on requires that users remain anonymous (it's part of a research study) and I'd consider email to be an identifying piece of data. Users will be added manually, so email is not required to confirm accounts or prevent spam sign-ups. Am I going to have to provide a fake email address for each account, or is there a way to leave this …
Category: Web

Possible to set new user's site time zone at user creation using Gravity Forms?

Let's say I have a multisite network running with Buddypress and has Gravity Forms installed with the GF User Registration addon. During new user/site registration, is there ANY way I can have the user set their time zone by selecting from a Gravity Form drop down menu the timezone they want? Basically, I don't want the user to have to login to WP and then go to General settings to change their time zones. Is there any way of achieving …
Category: Web

Linking form to user meta fields

I currently have my login page set up to allow sign up through google. Immediately after a successful sign up I'm looking to set up a redirect to a form where the user can enter additional details and these are saved within predefined user meta fields. I know how to set up the fields using ACF or Pods. Are there free plugins available which can link a form to the meta fields? I'm fairly new to developing hooks but if …
Category: Web

Set display name from nickname with register process

It is possible set display name from entered string into nickname registration field? I trying do this with simple hook, but after all it is not work. function set_default_display_name( $user_id ) { $user = get_userdata( $user_id ); $name = $user->nickname; $args = array( 'ID' => $user_id, 'display_name' => $name ); wp_update_user( $args ); } add_action( 'user_register', 'set_default_display_name' ); By default, immediately after registration, display name was set from WP username (login) not nickname. Can sombody help me to set a …
Category: Web

Adding more fields to the registration form

Am using Jupiter theme. https://demos.artbees.net/jupiter/labrandeus/ The registration has by default username and password fields. The view for it is defined as below: <?php if (get_option('users_can_register')) {?> <div id="mk-register-panel"> <div class="mk-login-title"><?php _e("Create Account", 'mk_framework');?></div> <form id="register_form" name="login_form" method="post" class="mk-form-regsiter" action="<?php echo site_url('wp-login.php?action=register', 'login_post')?>"> <span class="form-section"> <label for="log"><?php _e('Username', 'mk_framework');?></label> <input type="text" id="reg-username" name="user_login" class="text-input"> </span> <span class="form-section"> <label for="user_email"><?php _e('Your email', 'mk_framework');?></label> <input type="text" id="reg-email" name="user_email" class="text-input"> </span> <span class="form-section"> <input type="submit" id="signup" name="submit" class="accent-bg-color button" value="<?php _e("Create Account", 'mk_framework');?>"> </span> …
Category: Web

Registration key

I want to make my single wordpress installation a closed community. Only people who know the registration key should be able to sign up. I already added some more fields to the registration form but I can't fin a simple solution for the registration form to check if the code is correct!? Looking forward for some ideas! Thank you! Here's what I do have until now: // This function shows the form fiend on registration page add_action('register_form','show_first_name_field'); // This is …
Category: Web

Remove email verification when new user register

Please note I'm not posting this question without doing google search, but the problem is every single result I found is either about BuddyPress or WP Multisite, but I have a WP Single installation where I use Easy Digital Download and in terms to purchase anything user must have to register first. But the problem is their account doesn't get activated after registering if they visit customer dashboard it will show up that "Your account is not verified yet so …
Category: Web

Disable domain redirect

Desired behavior: http://www.situationware.com should stay at www.situationware.com, no registration required. Currently wordpress is automatically redirecting to the Amazon hostname ec2-107-22-241-162.compute-1.amazonaws.com, requesting users register, if I update wp-config.php by uncommenting DOMAIN_CURRENT_SITE I end up with a redirect loop to http://situationware.com/wp-signup.php?new=situationware.com As you'll see below I do have multisite installed as was working a few months ago before any upgrades to 3.6.1. I installed the WordPress MU Domain Mapping plugin, but didn't help and didn't hurt. I wasn't able to add a …
Category: Web

Register users without confirmation

I'm looking to register users without requiring confirmation of their emails (and even better, no password when they register). Basically, I want them to subscribe their mails using wp registration process and then redirect to a page of my choice. I know I can do it with CF7, or a newsletter plugin or whatever, but I actually need to use the default registration process because it connects to another plugin which uses it, and the UX flow is as follows: …
Category: Web

Duplicate notifications for new user registration

I am trying to figure out why new user registrations are receiving duplicate notification emails. They arrive at the exact same time but from different addresses, one is from the admin owner (myself) and the other one from [email protected]. I am using a custom registration form. Here are the relevant pieces of code: // auto generate a password $user_pass = wp_generate_password(); // setup new user $userdata = array( 'user_pass' => $user_pass, 'user_login' => esc_attr( $_POST['user_name'] ), 'user_email' => esc_attr( $_POST['email'] …
Category: Web

Disallow google/other email plus and dot tricks when registering?

A user registered with my WordPress blog as "[email protected]" (for example). I'm fine with that. However, if the user comes back with "[email protected]", I want to stop him for registering again, and maybe politely remind him that he's already registered with the "same" gmail address. Is there a plugin that does this? Same question for things like "[email protected]" and "[email protected]" (using extra dots in the email address, which gmail recognizes as the same address). I realize people can easily get …
Category: Web

Unable to Add User after Site Migration

After migrating a WordPress 4.7.2 site from staging to production, everything seems to be working fine except that I cannot add a new user. The All Users screen shows my existing 2 admin accounts that came from my staging site, plus a blank line with no name/edit button etc, which looks like a ghost entry. When I click on "Add New" I can enter and submit a new user, but it never shows in the list of users. Any tips …
Category: Web

Force User Registration before visitng Checkout Page

Is there any built in option available in Wordpress/WooCommerce which forces user to register/login before going to the checkout page? There is an option in WooCommerce >> Settings >> Accounts >> Account Creation >> Allow customers to create an account during checkout But this option not works if a non-logged in user visits a website, add item to the cart and go to the checkout page. I want that user must register before viewing the checkout page or at least …
Category: Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.