PDA

View Full Version : User ID in database


nsilva
01-27-2010, 08:33 PM
I'm trying to submit a form to the database, what would be the best way to log the name of the user who submitted the form to the database and what would be the best way to show that name (with a link to their profile) on the page that the form data is retrieved.

BBR-APBT
01-27-2010, 08:38 PM
I save both the user name and the user id in the database. The reason for this is I save a query or two later. I also build my own link instead of letting vBulletin do it also to save a query or a few querys.

My custom CMS only uses 13 querys, If I was to use all vBulletin functions the querys would be up around 29 or so.



$current_user = $vbulletin->userinfo['username'];
$current_userid = $vbulletin->userinfo['userid'];