CrispinP
Well-known member
Hi
I am trying to capture when a user saves their profile. I want to update a field when a custom value is changed.
I have my addon and what I think is correct class/method but I get an error
Callback Crispin\CountryAdjust\user::visitorSetup is invalid (error_invalid_class).
I've tried to plumb it in like this:
and my code is in src\AddOns\Crispin\CountryAdjust
Admittedly, all the above is copied from anther post here. Clearly I am missing something.
I am trying to capture when a user saves their profile. I want to update a field when a custom value is changed.
I have my addon and what I think is correct class/method but I get an error
Callback Crispin\CountryAdjust\user::visitorSetup is invalid (error_invalid_class).
Code:
<?php
namespace Crispin\CA\Listener;
use XF\Mvc\Entity\Structure;
class User extends XFCP_User
{
public static function visitorSetup(\XF\Entity\User &$visitor)
{
return true;
}
}
I've tried to plumb it in like this:
and my code is in src\AddOns\Crispin\CountryAdjust
Admittedly, all the above is copied from anther post here. Clearly I am missing something.