protected function loadUser($handle)
    {
        if (!$handle) {
            return null;
        }

        // Try to get user by ID
        $user = $this->modelFactory()->create(User::class);
        $user->load($handle);
        if ($user->id() !== null) {
            return $user;
        }

        // Try to get user by email
        $user->loadFrom('email', $handle);
        if ($user->id() !== null) {
            return $user;
        }

        return null;
    }