vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=327067

Userid in PHP-Module
by BulliM
01 Feb 2019 09:24

I've extended user profile site with a PHP-Module, which includes a php file. In this file I need to compare two variables.

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

First variable is userid from user, who visits the profile. Second is whos profile you watch.

In my script, second variable is empty. How can I get access to user profiles userid in my included PHP-Script?

--------------- Added 01 Feb 2019 at 17:05 ---------------

Frustrating.

noypiscripter 03 Feb 2019 05:09

The userid of the profile being viewed is not available in the $vbulletin variable. Just extract and parse it from the current profile URL.


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


BulliM 03 Feb 2019 07:17

Quote:

Originally Posted by noypiscripter (Post 2598351)
The userid of the profile being viewed is not available in the $vbulletin variable. Just extract and parse it from the current profile URL.


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

Nice solution.

Because profile userid is available in $vbulletin->scriptpath, my solution was:


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

Kind of the same way, but also differently.

noypiscripter 03 Feb 2019 18:14

What does scriptpath return? Can you give an example?

BulliM 03 Feb 2019 18:27

Quote:

Originally Posted by noypiscripter (Post 2598365)
What does scriptpath return? Can you give an example?

/member/123-username


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

Powered by vBulletin® Version 3.8.14
Copyright © 2022, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.