Make custom profile field available globally?

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Post Reply
FDMK
Registered User
Posts: 3
Joined: Mon May 14, 2018 6:43 pm

Make custom profile field available globally?

Post by FDMK » Fri May 18, 2018 1:43 pm

I'd like to make a custom profile field available to every page of the forum. It was easy in phpbb2, but I'm new to phpbb3 and not sure how to go about doing that.

Thanks

FDMK
Registered User
Posts: 3
Joined: Mon May 14, 2018 6:43 pm

Re: Make custom profile field available globally?

Post by FDMK » Fri May 18, 2018 2:24 pm

Nevermind, I figured it out.

In the page_header function in functions.php, I added:

$user->get_profile_fields( $user->data['user_id'] );

'USER_FIELD' => $user->profile_fields['pf_fieldname']

Post Reply

Return to “phpBB Custom Coding”

Who is online

Users browsing this forum: No registered users and 16 guests