Only allows deathdate changes if it is made by another user.
authorStéphane Jacob <sj@m4x.org>
Fri, 15 Oct 2010 12:34:05 +0000 (14:34 +0200)
committerStéphane Jacob <sj@m4x.org>
Fri, 15 Oct 2010 12:34:05 +0000 (14:34 +0200)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
modules/profile/general.inc.php

index 66d94b3..9684412 100644 (file)
@@ -661,7 +661,7 @@ class ProfilePageGeneral extends ProfilePage
                 }
             }
         }
-        if ($this->changed['deathdate']) {
+        if (!S::user()->isMe($this->owner) && $this->changed['deathdate']) {
             XDB::execute('UPDATE  profiles
                              SET  deathdate = {?}, deathdate_rec = NOW()
                            WHERE  pid = {?} AND deathdate_rec IS NULL',