Skip to:
Content
Pages
Categories
Search
Top
Bottom

Setting Values

  • @tracisuzen

    Participant

    Hello,

    I’m a newbie about PHP language but i kinda understand coding process and alghorithms. Anyway, I’d like to ask one thing.

    There is a outdated plugin which do not have support at that moment. This plugin help to create quizes. And I want to assign a value to the profile field of a user at the end of the quiz. I’ll try to my best to implement this idea to my wordpress setup.

    I want to hack the plugin result display page and add a little code to copy “the user result” to profile field of that user.

    I tried

    		$current_user = wp_get_current_user();
    		$current_user_id = $current_user->ID;
    		bp_profile_field_data( array(‘user_id’=>get_the_author_meta(‘ID’),’ASSIGNEDPROFILEID’=>$ASSIGNEDVALUE));

    but probably i’m wrong.

    What do i need to do right now? Because of the keywords i failed to find similar topics. Thanks for your replies.

    Good day,

Viewing 1 replies (of 1 total)
  • @tracisuzen

    Participant
    		$current_user = wp_get_current_user();
    		$current_user_id = $current_user->ID;
    		xprofile_set_field_data('Tip',$current_user_id,$profile);

    I needed xprofile_set_field_data function. And with the result of that code, I assign the profile $profile result to field named ‘Tip’ in my current setup.

    Good day

Viewing 1 replies (of 1 total)
  • The topic ‘Setting Values’ is closed to new replies.
Skip to toolbar