diff --git a/lib/Doctrine/Entities/User.php b/lib/Doctrine/Entities/User.php index 24ab40e56a..f6da6c210a 100644 --- a/lib/Doctrine/Entities/User.php +++ b/lib/Doctrine/Entities/User.php @@ -206,6 +206,11 @@ class User */ private $mailLocked = false; + /** + * @ORM\Column(type="boolean") + */ + private $deleted = false; + /** * @Gedmo\Timestampable(on="create") * @ORM\Column(type="datetime") @@ -765,6 +770,26 @@ class User $this->mailLocked = (Boolean) $mailLocked; } + /** + * @return boolean + */ + public function isDeleted() + { + return $this->deleted; + } + + /** + * @param boolean $deleted + * + * @return User + */ + public function setDeleted($deleted) + { + $this->deleted = (Boolean) $deleted; + + return $this; + } + /** * @return \DateTime */ diff --git a/lib/classes/patch/3902.php b/lib/classes/patch/3902.php index cf2a589bc2..1af4564aa8 100644 --- a/lib/classes/patch/3902.php +++ b/lib/classes/patch/3902.php @@ -89,6 +89,11 @@ class patch_3902 implements patchInterface } $user->setLogin($row['usr_login']); + + if (substr($row['usr_login'], 0, 10) === '(#deleted_') { + $user->setDeleted(true); + } + $user->setMailLocked(!!$row['mail_locked']); $user->setMailNotificationsActivated(!!$row['mail_notifications']); $user->setModelOf($row['model_of']);