contains('@'); $profile = Profile::whereUsername($username)->first(); if($profile) { if($profile->domain != null) { $instance = InstanceService::getByDomain($profile->domain); if($instance && $instance->banned == true) { return false; } } return true; } else { if($remote) { $parts = explode('@', $username); $domain = last($parts); $instance = InstanceService::getByDomain($domain); if($instance) { if($instance->banned == true) { return false; } else { $wf = WebfingerUrl::generateWebfingerUrl($username); $res = Http::head($wf); return $res->ok(); } } else { $wf = WebfingerUrl::generateWebfingerUrl($username); $res = Http::head($wf); return $res->ok(); } } } return false; }); } }