A Cozmoslabs Product
Documentation / Developer Knowledge Base / Login / Logout / Change username format when loggin in with Email only

Change username format when loggin in with Email only

Set the username the same as the email address, in case you login with Email only.

wppb_generated_random_uername is located in Profile Builder: /front-end/class-formbuilder.php

1
2
3
4
5
function wppb_same_username_as_email($username, $email){
    $username = sanitize_email($email);
    return $username;
}
add_filter('wppb_generated_random_username', 'wppb_same_username_as_email',10, 2);

Profile Builder Pro

Create beautiful front-end registration and profile forms with custom fields. Setup member directories, custom redirects, cutomize user emails & more using the all in one user management plugin.

Get Profile Builder

The Ultimate Membership Bundle

Combine the power of Profile Builder with Paid Member Subscriptions to set up user registration, memberships, and recurring revenue.

Get 25% off with the bundle

Help & Support

We’re here to help you every step of the way.

Open a Support Ticket