]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/User.php
Merge pull request #10344 from nupplaphil/bug/friendica-10342
[friendica.git] / src / Model / User.php
index 38a22f70f9a72e944d1a0eb18c7c94d43afc091b..029613b17b0b692e19e3301fcd6d2b841d54640e 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;
                }
 
@@ -1123,6 +1123,8 @@ class User
                                        Photo::update(['profile' => 1], ['resource-id' => $resource_id]);
                                }
                        }
+
+                       Contact::updateSelfFromUserID($uid, true);
                }
 
                Hook::callAll('register_account', $uid);