|
|
|
@ -4,29 +4,28 @@ |
|
|
|
|
namespace Chamilo\UserBundle\Entity; |
|
|
|
|
|
|
|
|
|
//use Chamilo\CoreBundle\Entity\UserFieldValues; |
|
|
|
|
use Sonata\UserBundle\Entity\BaseUser as BaseUser; |
|
|
|
|
use Doctrine\ORM\Mapping as ORM; |
|
|
|
|
use Chamilo\CoreBundle\Entity\ExtraFieldValues; |
|
|
|
|
use Doctrine\Common\Collections\ArrayCollection; |
|
|
|
|
use Doctrine\ORM\Event\LifecycleEventArgs; |
|
|
|
|
use Doctrine\ORM\Mapping as ORM; |
|
|
|
|
use Sonata\UserBundle\Entity\BaseUser as BaseUser; |
|
|
|
|
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; |
|
|
|
|
use Symfony\Component\HttpFoundation\File\File; |
|
|
|
|
use Symfony\Component\Security\Core\User\UserInterface; |
|
|
|
|
use Symfony\Component\Validator\Mapping\ClassMetadata; |
|
|
|
|
use Symfony\Component\Validator\Constraints as Assert; |
|
|
|
|
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; |
|
|
|
|
use Symfony\Component\Validator\Mapping\ClassMetadata; |
|
|
|
|
|
|
|
|
|
//use Chamilo\CoreBundle\Component\Auth; |
|
|
|
|
use Doctrine\ORM\Event\LifecycleEventArgs; |
|
|
|
|
//use FOS\MessageBundle\Model\ParticipantInterface; |
|
|
|
|
//use Chamilo\ThemeBundle\Model\UserInterface as ThemeUser; |
|
|
|
|
//use Vich\UploaderBundle\Mapping\Annotation as Vich; |
|
|
|
|
use Symfony\Component\HttpFoundation\File\File; |
|
|
|
|
//use Application\Sonata\MediaBundle\Entity\Media; |
|
|
|
|
//use Chamilo\UserBundle\Model\UserInterface as UserInterfaceModel; |
|
|
|
|
|
|
|
|
|
use Doctrine\Common\Collections\Collection; |
|
|
|
|
//use Sylius\Component\Attribute\Model\AttributeValueInterface as BaseAttributeValueInterface; |
|
|
|
|
//use Sylius\Component\Variation\Model\OptionInterface as BaseOptionInterface; |
|
|
|
|
//use Sylius\Component\Variation\Model\VariantInterface as BaseVariantInterface; |
|
|
|
|
|
|
|
|
|
use Chamilo\CoreBundle\Entity\ExtraFieldValues; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @ORM\HasLifecycleCallbacks |
|
|
|
|
* @ORM\Table(name="user") |
|
|
|
@ -256,6 +255,11 @@ class User extends BaseUser //implements ParticipantInterface, ThemeUser |
|
|
|
|
*/ |
|
|
|
|
private $hrDeptId; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @ORM\Column(type="string", length=255) |
|
|
|
|
*/ |
|
|
|
|
protected $salt; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @ORM\OneToMany(targetEntity="Chamilo\CoreBundle\Entity\CourseRelUser", mappedBy="user") |
|
|
|
|
**/ |
|
|
|
@ -295,10 +299,6 @@ class User extends BaseUser //implements ParticipantInterface, ThemeUser |
|
|
|
|
*/ |
|
|
|
|
//protected $groups; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @ORM\Column(type="string", length=255) |
|
|
|
|
*/ |
|
|
|
|
//protected $salt; |
|
|
|
|
|
|
|
|
|
//private $isActive; |
|
|
|
|
|
|
|
|
@ -344,7 +344,7 @@ class User extends BaseUser //implements ParticipantInterface, ThemeUser |
|
|
|
|
{ |
|
|
|
|
parent::__construct(); |
|
|
|
|
|
|
|
|
|
//$this->salt = sha1(uniqid(null, true)); |
|
|
|
|
$this->salt = sha1(uniqid(null, true)); |
|
|
|
|
$this->isActive = true; |
|
|
|
|
$this->active = 1; |
|
|
|
|
$this->registrationDate = new \DateTime(); |
|
|
|
|