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 field blank?
It’s possible, just no so easily via the Users page without some hackery.
The WordPress API will let you insert users without email addresses, so a little custom plugin to accept a login name and password, and a call to wp_insert_user
or wp_update_user
should work for you. Unfortunately I don’t have time to code it up for you, but perhaps this will point you in a direction.
$userdata = array ('user_login' => 'someuser', 'user_pass' => 'swordfish');
$new_user_id = wp_update_user( $userdata );