A Cozmoslabs Product
Documentation / Profile Builder 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);

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