Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Remove email address on WP registration? WordPress

<strong>UPDATE: Fixed</strong>
Manually fixed and plugin submitted to WP repo!
<strong>/UPDATE</strong>

Hi, I want to remove the need for subscribers to provide a username on registration (instead, set their email address as their username).

Is there any way to do this via hooks / actions / filters with native WP functionality? I wan't to be upgradable (and conflict free with other plugins).

Here's the code that works at the minute, but is on core files.

/* CORE MODIFICATION

file: /wp-login.php

reason: Remove email on registration

1. Set username to email address
---
$sanitized_user_login = sanitize_user( $user_login );
>>>
$sanitized_user_login = sanitize_user( $user_email );
---

2. Hide username field
---
<!--<p>
<label for="user_login"><?php _e('Username') ?><br />
<input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr(stripslashes($user_login)); ?>" size="20" tabindex="10" /></label>
</p>-->
---

*/

Answers (6)

2012-07-08

Romel Apuya answers:

there's a plugin for that.

[[LINK href="wordpress.org/support/topic/plugin-improved-user-experience-email-only-login-facebook-style?replies=1#post-2948725"]]wordpress.org/support/topic/plugin-improved-user-experience-email-only-login-facebook-style?replies=1#post-2948725[[/LINK]]


Techster comments:

If you read, these are desired features and not included in the plugin (http://wordpress.org/extend/plugins/improved-user-experience/)

2012-07-08

Arnav Joy answers:

are you using any plugin or default registration form of wp


Techster comments:

default registration form and would like to keep it that way - what do you suggest?

2012-07-09

Pali Madra answers:

Here is the plugin that would do the trick for you.

[[LINK href="http://"]]http://wordpress.org/extend/plugins/disable-registration-email/[[/LINK]]

This is the easiest way to do it.

However, this will ask for the username and that would be have to be provided when the customer wants to login.

For customizing the form the plugin I suggest is

[[LINK href="http://wordpress.org/extend/plugins/custom-user-registration/"]][[/LINK]]

which allows you to customize the fields of the registration page.


Cheers
Pali Madra


Techster comments:

This simply disables the email being sent to new users (and not the email field on the form)

2012-07-09

Francisco Javier Carazo Gil answers:

Hi Techster,

If you don't want to use plugins look at it: http://www.tutorialstag.com/create-custom-wordpress-registration-page.html


Techster comments:

Good suggestion but we want to use the native WP registration

2012-07-09

Gabriel Reguly answers:

Hi Techster,

Try this plugin: WP Email Login

<blockquote>Use your email address instead of a username to log into your WordPress. </blockquote>

[[LINK href="http://wordpress.org/extend/plugins/wp-email-login/"]]http://wordpress.org/extend/plugins/wp-email-login/[[/LINK]]

Regards,
Gabriel


Techster comments:

We want to disable email on the registration page

2012-07-12

oslemmonseste answers:

斜挎包_箱包分类_真皮包包