0

We are looking to modify the registration so that no email is required (yes we know this will be an issue). We are using the Registration Plus Redux plugin since it has options we are using currently.

How can we have it so that when a new user signs up, we only ask for their First Name, Username they choose and password?

UPDATE

Our servers/system doesn't allow email to be sent (company policy) and we can't store email addresses due to PII policies (we'll be dealing with European countries that doesn't allow for email addresses to be stored since its a Privacy issue).

We can only have First name and their password (with Registration Redux, we are creating registration codes they can use, that will appear in their profile, to help with password reset, which will be done through our customer service). No email notifications will be sent out (we have auto-approval on).

6
  • 1
    That's a tough one. WordPress expects an email in lots of places. You might be better off using a random "fake" address (on the site domain), and then hiding the email from the user profile & users table. Commented Apr 20, 2015 at 17:44
  • While it is possible to customize the registration page and account creation, you will run into a problem with email. WP expects an email address. You might be able to put in a fake address, but that would break other WP functions - e.g. password reset, notifications, etc.
    – user42826
    Commented Apr 20, 2015 at 17:48
  • Please see update
    – Keoki
    Commented Apr 20, 2015 at 18:11
  • Hi theDeadMedic, how would I go about doing that? I recently did that with Buddypress, since it doesn't use the WP core login, just through a template, but I don't want to mess around with WP core in case updates are made. would it be possible through the functions.php file in my theme?
    – Keoki
    Commented Apr 20, 2015 at 18:13
  • I provided a link to customize your registration form. Multisite WP uses different hooks/filters. I customized our registration form, but with different requirements. Our users only needed to provide email address for registration and nothing else.
    – user42826
    Commented Apr 21, 2015 at 17:43

2 Answers 2

1

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 my_user_profile_update_errors($errors, $update, $user) {
    $errors->remove('empty_email');
}

add_action('user_new_form', 'my_user_new_form', 10, 1);
add_action('show_user_profile', 'my_user_new_form', 10, 1);
add_action('edit_user_profile', 'my_user_new_form', 10, 1);
function my_user_new_form($form_type) {
    ?>
    <script type="text/javascript">
    jQuery('#email').closest('tr').removeClass('form-required').find('.description').remove();

    <?php if (isset($form_type) && $form_type === 'add-new-user') : ?>
        jQuery ('#send_user_notification') .removeAttr('checked');
    <?php endif; ?>
    </script>
    <?php
}
-1

To customize your registration form, follow the instructions outlined here - Customizing the Registration Form. Note that your requirements are unusual so your customization will be more extensive. AFAIK you will need to provide a fake email address per account. You can use javascript in the registration form to fill-in necessary data (e.g. email address).

3
  • Hi, the link doesn't say where you put this customized code. Is it through functions.php in your theme? I already have a php script that I generate a fake email that can fill in a hidden email field.
    – Keoki
    Commented Apr 21, 2015 at 19:00
  • You can add use that code in various ways. You can put the content into a plugin, in your theme, or in a must-use plugin. Putting the code into your own plugin is most flexible method because the plugin can be turned on/off at any time. If you put it into your theme (functions.php), you have to remember if you change themes.
    – user42826
    Commented Apr 21, 2015 at 20:21
  • I have never made a plugin, so just looking at theme options.
    – Keoki
    Commented Apr 21, 2015 at 21:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.