protected function getDomainAndUsername($name)
    {
        if (false !== strpos($name, '\\')) {
            return explode('\\', $name);
        }

        if (false !== strpos($name, '@')) {
            list($user, $domain) = explode('@', $name);

            return [$domain, $user];
        }

        // no domain passed
        return ['', $name];
    }