PDA

View Full Version : Echo username from userid


grey_goose
05-10-2015, 12:47 PM
{vb:raw bbuserinfo.field163}

I have a custom profile field, 163, that is the userid of a -different- account (users have multiple accounts).

How do i use that profile field's userid (#) to display the username of that referenced account in a template? The above doesn't work, and I've been looking around for a way to do it without calling a php query to the database.

Lynne
05-10-2015, 02:20 PM
The userfield table, which is where the data for the userfields is stored, has a userid field, but no username field. So, you would need to do a query to get the userid for the username you wish to get the field data.