Retrieving CPF Fields
Posted
#4827
(In Topic #1057)
Standard member

Can someone give me some advise on how ( in php) would you return a specific CPF field for a member.
ie $_username = $GLOBALS['CNS_DRIVER']->get_member_row_field($member_id, 'm_username');
returns the Username
if I had a CPF called "ScreenName" how would i get that using the $member_id.
The end goal ( if im feeling brave) is to try and modify the forum system to display the CPF "ScreenName", rather than the username. Its only the displayed text i want to change rather than any underlying links or the functionality
This is both for security to prevent people who use their e-mail address as their user name from it obviously being displayed, and convienience as some usernames are not always clear to the user.
As a fall back if the CPF is null/blank, then i would aim to continue to display the username.
Thanks
Chris
Posted
Site staff

Posted
Standard member

I missed that config option completely. I'll give it a go
Chris
Posted
Standard member

Works a treat.
Posted
Site staff

Posted
Site director

Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon
- If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
- If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
- If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
- If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
1 guest and 0 members have just viewed this.

