mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-11 12:03:14 +00:00
Add Deleted field
This commit is contained in:
@@ -206,6 +206,11 @@ class User
|
|||||||
*/
|
*/
|
||||||
private $mailLocked = false;
|
private $mailLocked = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="boolean")
|
||||||
|
*/
|
||||||
|
private $deleted = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Gedmo\Timestampable(on="create")
|
* @Gedmo\Timestampable(on="create")
|
||||||
* @ORM\Column(type="datetime")
|
* @ORM\Column(type="datetime")
|
||||||
@@ -765,6 +770,26 @@ class User
|
|||||||
$this->mailLocked = (Boolean) $mailLocked;
|
$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
|
* @return \DateTime
|
||||||
*/
|
*/
|
||||||
|
@@ -89,6 +89,11 @@ class patch_3902 implements patchInterface
|
|||||||
|
|
||||||
}
|
}
|
||||||
$user->setLogin($row['usr_login']);
|
$user->setLogin($row['usr_login']);
|
||||||
|
|
||||||
|
if (substr($row['usr_login'], 0, 10) === '(#deleted_') {
|
||||||
|
$user->setDeleted(true);
|
||||||
|
}
|
||||||
|
|
||||||
$user->setMailLocked(!!$row['mail_locked']);
|
$user->setMailLocked(!!$row['mail_locked']);
|
||||||
$user->setMailNotificationsActivated(!!$row['mail_notifications']);
|
$user->setMailNotificationsActivated(!!$row['mail_notifications']);
|
||||||
$user->setModelOf($row['model_of']);
|
$user->setModelOf($row['model_of']);
|
||||||
|
Reference in New Issue
Block a user