Skip to:
Content
Pages
Categories
Search
Top
Bottom

XProfile fields: Full Name

  • @egerrits

    Participant

    Can anybody tell me why the following code works for custom profile fields but not the built in FullName field?

    $meta[‘field_1’]=‘Hello World’;

    $meta[‘xprofile_field_ids’]=“1,”;

    $_SESSION[‘xprofile_meta’]=$meta;

    wpmu_signup_user($user_data[‘user_login’], $user_data[‘user_email’], apply_filters( “add_signup_meta”, array()) );

    This code works though:

    $meta[‘field_{$custom_field_id}’]=‘Hello World’;

    $meta[‘xprofile_field_ids’]=$custom_field_id.’,’;

    $_SESSION[‘xprofile_meta’]=$meta;

    wpmu_signup_user($user_data[‘user_login’], $user_data[‘user_email’], apply_filters( “add_signup_meta”, array()) );

Viewing 1 replies (of 1 total)
  • @burtadsit

    Participant

    Not sure egerrits. Don’t know what the context is. Are you sure that is what is happening there? If those are single quotes in this chunk of code then $meta[‘field_{$custom_field_id}’] = ‘Hello World’; then that won’t work. The resolve as string operation ‘{}’ doesn’t work in single quoted strings. Only double quoted strings.

Viewing 1 replies (of 1 total)
  • The topic ‘XProfile fields: Full Name’ is closed to new replies.
Skip to toolbar