]> git.mxchange.org Git - friendica.git/blobdiff - mod/profiles.php
Better detection for remote user
[friendica.git] / mod / profiles.php
index 0b8261422f3b5b36b316f44b2e95eb2edac84ebd..780a279b54897df42dd88c623ba9ac90e6a82bdb 100644 (file)
@@ -484,7 +484,7 @@ function profiles_post(&$a) {
                if($is_default) {
                        $location = formatted_location(array("locality" => $locality, "region" => $region, "country-name" => $country_name));
 
-                       $r = q("UPDATE `contact` SET `about` = '%s', `location` = '%s', `keywords` = '%s', `gender` = '%s' WHERE `self` = 1 AND `uid` = %d",
+                       q("UPDATE `contact` SET `about` = '%s', `location` = '%s', `keywords` = '%s', `gender` = '%s' WHERE `self` AND `uid` = %d",
                                dbesc($about),
                                dbesc($location),
                                dbesc($pub_keywords),
@@ -499,6 +499,9 @@ function profiles_post(&$a) {
 
                        require_once('include/profile_update.php');
                        profile_change();
+
+                       // Update the global contact for the user
+                       update_gcontact_for_user(local_user());
                }
        }
 }
@@ -526,6 +529,8 @@ function profile_activity($changed, $value) {
                return;
 
        $arr = array();
+
+       $arr['guid'] = get_guid(32);
        $arr['uri'] = $arr['parent-uri'] = item_new_uri($a->get_hostname(), local_user());
        $arr['uid'] = local_user();
        $arr['contact-id'] = $self[0]['id'];