Currently working on an add-on. I've installed a column on the user table named btr_last_changed_custom_title, I've put a listener and everything.
But while
work, this doesn't -
Gives me an error -
And I did put up a listener for the User entity
So why can't I pull this column?
But while
PHP:
$visitor = \XF::visitor();
echo $visitor->Admin->last_login;
work, this doesn't -
PHP:
$visitor = \XF::visitor();
echo $visitor->User->btr_last_changed_custom_title;
Gives me an error -
Code:
ErrorException: [E_USER_WARNING] Accessed unknown getter 'User' on XF:User[1] in src\XF\Mvc\Entity\Entity.php
And I did put up a listener for the User entity
PHP:
use XF\Mvc\Entity\Entity;
class Listener
{
public static function userEntityStructure(\XF\Mvc\Entity\Manager $em, \XF\Mvc\Entity\Structure &$structure)
{
$structure->columns['btr_last_changed_custom_title'] = ['type' => Entity::INT, 'default' => 0];
$structure->getters['btr_last_changed_custom_title'] = 'true';
}
}
So why can't I pull this column?