• Resolved kunthawat

    (@kunthawat)


    I want the user fill Firstname and Lastname when they register by Line. Now the plugin ask for email only.

    • This topic was modified 1 year, 1 month ago by kunthawat.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Heateor Support

    (@heateor)

    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.

    Thread Starter kunthawat

    (@kunthawat)

    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?

    Plugin Author Heateor Support

    (@heateor)

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Can you add Firstname and Lastname for Social register?’ is closed to new replies.