]> git.mxchange.org Git - friendica.git/commitdiff
Update the "photo" and "thumb" field in the "profile" table
authorMichael <heluecht@pirati.ca>
Sat, 14 Apr 2018 08:03:15 +0000 (08:03 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 14 Apr 2018 08:03:15 +0000 (08:03 +0000)
src/Model/Contact.php

index 644662e4ecb8dc91de48dc4c72faa18ae98812b8..eeecac1465ee60da6e9cd623988d0b52839c414f 100644 (file)
@@ -220,6 +220,11 @@ class Contact extends BaseObject
 
                        // Update the public contact as well
                        dba::update('contact', $fields, ['uid' => 0, 'nurl' => $self['nurl']]);
+
+                       // Update the profile
+                       $fields = ['photo' => System::baseUrl() . '/photo/profile/' .$uid . '.jpg',
+                               'thumb' => System::baseUrl() . '/photo/avatar/' . $uid .'.jpg'];
+                       dba::update('profile', $fields, ['uid' => $uid, 'is-default' => true]);
                }
        }