vBulletin Modifications

Username from ID?

Welcome to vBHackers.com! - vBHackers Updates:

Go Back   vBulletin Modifications > General vBulletin Section > General vBulletin Support

Reply
 
LinkBack Thread Tools
Old 06-28-2006, 03:38 PM   #1
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default Username from ID?

If i had a user's id but in the table i need the username as well what would i do. For example in a table i had 2 columns. I Inserted a new row:
You must first be a registered member to view any code.
X = userid Y= username. How would i do this?


Not terribly clear i know...




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 06-28-2006, 03:42 PM   #2
vBulletin Guru
Arnoud's Avatar
Join Date: Nov 2004
Real Name: Arnoud Kuipers
Location: Europe, Flanders
Arnoud is on a distinguished road

Default

$vbulletin->userinfo[username]?




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-28-2006, 03:44 PM   #3
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default

hold on a sec ;)




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-28-2006, 03:47 PM   #4
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default

Ok, i mean like in a php script i have got a userid off someone would would i have to do to make a variabel for the username eg.
You must first be a registered member to view any code.
xD or maybe not




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-28-2006, 03:49 PM   #5
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default

You could do it like
Quote:
SELECT username from user WHERE userid =$ID




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-28-2006, 03:50 PM   #6
vBulletin Guru
Arnoud's Avatar
Join Date: Nov 2004
Real Name: Arnoud Kuipers
Location: Europe, Flanders
Arnoud is on a distinguished road

Default

Oh like that.

You could add a query, but I believe vB has a function for this. I wouldn't know which one though, have a look at some hacks which would use this.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-28-2006, 04:42 PM   #7
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default

I have... what i came up with was this:
Quote:
$Shout['username'] = fetch_musername($Shout, 'usergroupid');
which isn't really helpful becuase it uses shout...




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-28-2006, 04:54 PM   #8
vBulletin Guru
Arnoud's Avatar
Join Date: Nov 2004
Real Name: Arnoud Kuipers
Location: Europe, Flanders
Arnoud is on a distinguished road

Default

Is that the exact code?




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-28-2006, 04:58 PM   #9
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default

Well not all the code in the file. all the code in the file is:
You must first be a registered member to view any code.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-28-2006, 05:03 PM   #10
vBulletin Guru
Arnoud's Avatar
Join Date: Nov 2004
Real Name: Arnoud Kuipers
Location: Europe, Flanders
Arnoud is on a distinguished road

Default

Try using:

You must first be a registered member to view any code.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Allowing members to change their username doggy1 vBulletin Modification Requests 7 07-11-2006 09:35 AM
how can i get the user id and username just with PHP? AnoxiA General vBulletin Support 12 02-04-2006 04:21 PM
How mod to set color for username? DungIT vBulletin Modification Requests 1 07-01-2005 08:31 AM
1 missing phrase and request change username. D3LTA Site Feedback 2 01-17-2005 01:46 AM


All times are GMT -3. The time now is 04:18 PM.


SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc. (Patent Pending)