WordPress.org

Ready to get started?Download WordPress

Forums

need admin to be able to create users without email address (3 posts)

  1. arkham
    Member
    Posted 4 years ago #

    I have to set up a site where the admin can create new users without email addresses because we won't know them at the time.

    Upon the user's first login they will be taken to their user profile where they will need to enter their email and some other contact info.

    I think I have a decent grasp on how to do the user profile part but as I tried hacking away at the admin/user-new.php I'm having some issues with the existing email validation. I replaced the email text field with an empty hidden field, and removed the required class.

    But still in the Ajax response I'm getting "ERROR: Please enter an e-mail address."

    Please let me know where I can find this validation... Any other advice or warnings about this endeavor are also welcome of course.

    Thanks in advance

  2. arkham
    Member
    Posted 4 years ago #

    seems like i've got this working now... i had to modify edit_user function inside wp-admin/includes/user.php

    also added a plugin to allow multiple users to have the same email address so that multiple users with blank emails wouldn't throw errors.

    i put the email validation inside a if ($update) conditional so that when the users login to their profile an email address will be required.

    hope this helps someone in the future looking to do something similar.

  3. julian124
    Member
    Posted 3 years ago #

    Hi there Arkham, I am looking to do the same thing, can you please go into more detail as to how you accomplished this? Thank you.

Topic Closed

This topic has been closed to new replies.

About this Topic