Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 01 Sep 2019, 20:16
doc55 doc55 is offline
 
Join Date: Aug 2019
Get logged in username

I'm using the following script to get the userid for the logged in user.

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

How can I get the username for the logged in user?
Reply With Quote
  #2  
Old 01 Sep 2019, 20:41
Dave Dave is offline
 
Join Date: Jun 2010
Real name: Dave
The vB_User class at /core/vb/api/user.php has a fetchUserinfo method that will return the userinfo of the current session.

I can't test if this works but something like:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

or

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

and then read it by accessing the username array key of the $userInfo array.
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
  #3  
Old 02 Sep 2019, 16:50
doc55 doc55 is offline
 
Join Date: Aug 2019
Originally Posted by Dave View Post
The vB_User class at /core/vb/api/user.php has a fetchUserinfo method that will return the userinfo of the current session.

I can't test if this works but something like:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

or

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

and then read it by accessing the username array key of the $userInfo array.
Perfect. Thanks a bunch.
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


New To Site? Need Help?

All times are GMT. The time now is 08:40.

Layout Options | Width: Wide Color: