Custom User Field Callback - Get User

SirWill

Member
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.
 
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.
 
Okay, if there is no way to get the user then I have to use $visitor and ignore the validate in the ACP as workaround.
 
Top Bottom