As 'yourself' does not appear when the editor is not the the profile owner, do not...
authorStéphane Jacob <sj@m4x.org>
Sat, 20 Nov 2010 14:13:44 +0000 (15:13 +0100)
committerStéphane Jacob <sj@m4x.org>
Sat, 20 Nov 2010 14:13:44 +0000 (15:13 +0100)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
modules/profile/general.inc.php

index 9684412..900c1c8 100644 (file)
@@ -636,7 +636,7 @@ class ProfilePageGeneral extends ProfilePage
                            WHERE  pid = {?}",
                          $this->values['photo_pub'], $this->pid());
         }
-        if ($this->changed['yourself']) {
+        if (S::user()->isMe($this->owner) && $this->changed['yourself']) {
             if ($this->owner) {
                 XDB::execute('UPDATE  accounts
                                  SET  display_name = {?}