loadUserByUsername example

private InMemoryUserProvider $inner;

    public static bool $changePassword = false;

    public function __construct(InMemoryUserProvider $inner)
    {
        $this->inner = $inner;
    }

    public function loadUserByUsername($username): UserInterface
    {
        return $this->changeUser($this->inner->loadUserByUsername($username));
    }

    public function loadUserByIdentifier(string $userIdentifier): UserInterface
    {
        return $this->changeUser($this->inner->loadUserByIdentifier($userIdentifier));
    }

    public function refreshUser(UserInterface $user): UserInterface
    {
        return $this->changeUser($this->inner->refreshUser($user));
    }

    
Home | Imprint | This part of the site doesn't use cookies.