Skip to content

Loading relations after refresh, not just after auth.token.created #40

Open
@Tasemu

Description

@Tasemu

Hey guys, at the moment when i log in everything works lovely, however when i refresh the page my relations aren't loaded into the user like they are when logging in. Do i need to just load in the relations on the auth.token.valid event too or?

Event::listen('auth.token.valid', function($user)
{
//Token is valid, set the user on auth system.
Auth::setUser($user);
});

Event::listen('auth.token.created', function($user, $token)
{
$user->load('position', 'sites', 'roles', 'roleIds');
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions