src/Tomahawk/Authentication/AuthenticationProvider.php
private function loadUser()
    {
        $user = null;

        if ($username = $this->storage->getIdentifier($this->storageKey)) {
            $user = $this->userProvider->findUserByUsername($username);
        }

        if ($user) {
            $this->loggedIn = true;
        }

        return $user;
    }
private function loadUser()
    {
        $user = null;

        if ($username = $this->storage->getIdentifier($this->storageKey)) {
            $user = $this->userProvider->findUserByUsername($username);
        }

        if ($user) {
            $this->loggedIn = true;
        }

        return $user;
    }
Load user

@return null|UserInterface