anziosoftware
Forum Replies Created
-
Hello, I’m not a coder, just a software small shop, anyway after few hours of internet search with help of a string search program, just find out the position where when in the form is missing the Username it will be replaced with initial part of Email as per question of this support post.
You have to go to INCLUDES – FRONTEND – class-ur-frontend-form-handler.php LINE 95
if ( empty( $userdata[‘user_login’] ) ) {
$part_of_email = explode( ‘@’, $userdata[‘user_email’] );
$username = check_username( $part_of_email[0] );
$userdata[‘user_login’] = $username;
}
This is where if login is empty it takes the substring of email, I just have make same small change to let it works without doing this but just using the full email
if ( empty( $userdata[‘user_login’] ) ) {
//$part_of_email = explode( ‘@’, $userdata[‘user_email’] );
$part_of_email = $userdata[‘user_email’];
//$username = check_username( $part_of_email [0] );
$username = check_username( $part_of_email);
$userdata[‘user_login’] = $username;
// $userdata[‘user_login’] = $userdata[‘user_email’]
}
It works fine, even if I’m not a coder but this will work until the plugin have an UPDATE otherwise you have to go again in the file and repeat the change if update have some effect on the file.
I would be very happy if the programmers would implement the possibility (a flag or something else) that if ON would force the EMAIL field as LOGIN as an alternative and in the meantime give us a hint on how to put this code using the SNIPPETS PLUGIN to work regardless of updates. THANKS IN ADVANCE
Same for me…