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

How to modify $visitor instance in visitor_setup?

tyteen4a03

Well-known member
#1
I want to do something to $visitor->_user in visitor_setup, however, I'm getting Indirect modification of overloaded property has no effect errors.

How do I properly do this?
 

xf_phantom

Well-known member
#4
it's working for me

PHP:
public static function injectIgnoredUsers(XenForo_Visitor &$visitor){
$visitor['my_new_foo'] = 'we\'re here';
$visitor['ignoredUsers'] = self::getIgnoredUsers();
}