Plugin captures the name from the Line profile of the user logging in. Plugin asks for Email because Line login doesn’t provide email address of the user with other profile data, by default.
I need to add Firstname and Lastname. Can you suggest php to fill Lastname with “none” from people who register with Line and Facebook if they don’t have Lastname?
Yes, you can add following code in the functions.php file of your active theme for the desired outcome.
/*
* Use Last name as "none" for the users logging in via Line and Facebook
*/
function heateor_ss_format_profile_data( $temp, $profileData, $provider ) {
if ( $provider == 'facebook' || $provider == 'line' ) {
if ( ! $temp['last_name'] ) {
$temp['last_name'] = 'none';
}
}
return $temp;
}
add_filter( 'the_champ_hook_format_profile_data', 'heateor_ss_format_profile_data', 10, 3 );