Skip to:
Content
Pages
Categories
Search
Top
Bottom

Code to set display-name value when bp_core_activated_user


  • assal0le
    Participant

    @assal0le

    Can anyone show me the code that I can use to set display-name value when bp_core_activated_user in function.php?

Viewing 2 replies - 1 through 2 (of 2 total)

  • modemlooper
    Moderator

    @modemlooper

    You can update a field with this function

    xprofile_set_field_data( $field, $user_id, $value, $is_required = false )
    
    $fields = field id
    $user_id = current login user id
    $value = inserted value
    $is_required = boolean

    Hook your function to

    do_action( 'bp_core_activated_user', $user_id, $key, $user )


    assal0le
    Participant

    @assal0le

    Yes I got it, thx!

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar