]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/User.php
Merge pull request #10323 from annando/issue-10306
[friendica.git] / src / Model / User.php
index 38a22f70f9a72e944d1a0eb18c7c94d43afc091b..2131406d4a5f8cf2be7432c66b57f2839936224c 100644 (file)
@@ -312,8 +312,8 @@ class User
         */
        public static function getIdForURL(string $url)
        {
-               // Avoid any database requests when the hostname isn't even part of the url.
-               if (!strpos($url, DI::baseUrl()->getHostname())) {
+               // Avoid database queries when the local node hostname isn't even part of the url.
+               if (!Contact::isLocal($url)) {
                        return 0;
                }