XenForo 2.0 Retrieve User Id

Anonimo88

Member
Registered
Joined
Apr 23, 2021
Messages
12
Points
13

Reputation:

Hello,
I started with the creation of the addon, I had created a class in src/addons/FI that I am going to recall with a node, you explained to me with sending a value from the file to the page, now I would like to understand how to access the available XF data, such as the user_id of the user who is visiting the page
 

Soft4Win

Developer
Staff member
Moderator
Collaborate
Registered
Joined
Apr 27, 2019
Messages
370
Points
103

Reputation:

You can access the current visiting usrr id with this :-

PHP:
\XF::visitor()->user_id
 

Anonimo88

Member
Registered
Joined
Apr 23, 2021
Messages
12
Points
13

Reputation:

Nice, thank you!
Where I can find all options available?
 
Top