You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<?php if($isLoggedIn): ?>
<p><?= $user->username() ?> / <?= $user->fullname() ?></p>
<?php print_r($user); ?>
<?php else: ?>
no user logged in
<?php endif; ?>
and when the user is logged in everything goes good, but if the user is logged out there is:
Uncaught Formwork\Users\Exceptions\UserNotLoggedException: No user is logged in
formwork\src\Panel\Panel.php:50
* Return currently logged in user
*/
public function user(): User
{
return $this->users->loggedIn()
?? throw new UserNotLoggedException('No user is logged in');
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
formwork2 beta3
i am trying to check in controller and template if user is logged in
my controller looks like:
and template:
and when the user is logged in everything goes good, but if the user is logged out there is:
any ideas how to solve it ?
ok i got it
Beta Was this translation helpful? Give feedback.
All reactions