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);