문제

I want to check a purchase code, entered by a user.

So on registration page, there is a custom profile field "purchase_code", which value I want to use, to check the code.

So my question: With which function I can get value of the custom profile field "purchase_code"?

Something like "get_value_of_purchase_code"....

도움이 되었습니까?

해결책

include_once($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx);
$user_id = 2; //The id of the user that you want to get the custom profiles fields
$cp = new custom_profile();
$user_fields = $cp->generate_profile_fields_template('grab', $user_id);

This creates a multidimensional array in $user_fields containing all the selected users custom fields, including the value and all the field data.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top