I'm making my first component and am trying to get the id of the logged-in user and request some data from the model based on that user id.
If I search around this would return the current user:
use Joomla\CMS\Factory; $user = Factory::getUser();
$user returns as an empty object:
Joomla\CMS\User\User Object ( [isRoot:protected] => [id] => 0 [name] => [username] => [email] => [password] => [password_clear] => [block] => [sendEmail] => 0 [registerDate] => [lastvisitDate] => [activation] => [para.......
I'm currently doing this in my
view.html.php right before
$this->items = $this->get('Items'); is called. Could it have something to do with the place where im caling