This topic contains 4 reply and 2 voices, and was last updated by towhid 6 years ago
Viewing 4 Posts - 1 through 4 (of 4 total)
Author Posts
September 23, 2015 at 4:38 pm 72968
towhid hi currently, when a guest submits a form on my site, if they are not a user then wp frontend user registers them as a user - wonderful. At the moment the field 'name' on the form goes into display name in the user profile and the new 'user name' that the plugin creates, goes into Nickname How can I change the plugin files so that the 'Name' field that the user creates goes into Nickname in their profile - as opposed to their user name? Id also like to use the full email address as their user name too? Can anyone help?
September 23, 2015 at 7:06 pm 72992
Marc Peacock-Smith Marc Peacock-Smith

Ive managed to put their full name into nickname with wp_update_user( array(‘ID’ => $user_id, ‘nickname’ => $guest_name) );

But I cant work out how to use the full email address as username?

Currently when I log a new user my email address gets transformed to a user name of marc23 or some other random number. Even though my user doesnt exist as an active user.

September 30, 2015 at 2:58 pm 73532
towhid towhid

Hello Marc,

To use email as username please follow this steps:

Step 1: Please navigate to plugins/wp-user-frontend/class/render-form.php

Step 2: Find
$username = sanitize_user( substr( $email, 0, strpos( $email, '@' ) ) );

Step 3: Replace the following line over the previous line.
$username = $email;


October 8, 2015 at 2:59 pm 74313
Marc Peacock-Smith Marc Peacock-Smith

Thank you – that works…much apreciated

October 8, 2015 at 6:16 pm 74330
towhid towhid This reply has been marked as private.
Viewing 4 Posts - 1 through 4 (of 4 total)