• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Custom User Field Callback - Get User

#1
hey,

how can I get the actual user/user_id in a php callback from the affected user?
There is the $visitor variable which works in /account but not in the ACP as it gives the viewing user and not the user who gets edited.
 

Chris D

XenForo developer
Staff member
#2
The only callback available to user fields is the validation callback. This is designed to verify a valid value is entered and it is not aware of anything other than the field and the value being entered. As such, it's impossible to know which user the value is being applied to.