Skip to content
Snippets Groups Projects
Select Git revision
  • e8459a5167ceb7f9bcbd1d414093fe060ee4f429
  • mui5-annotation-on-video-stable default
  • get_setter_canvasSizeInformations
  • fix-error-div-into-p
  • annotation-on-video-v2
  • detached
  • annotation-on-video-r17
  • mui5
  • mui5-react-18
  • jacob-test
  • annotation-on-video protected
  • master
  • test-antoinev1
  • 20-fetch-thumbnail-on-annotation
  • add-research-field
  • Save
  • add-plugin
  • 14-wip-no-seek-to
  • 14-bug-on-video-time-control
  • 9_wip_videotests
  • _upgrade_material_ui
  • latest-tetras-16
  • v3.3.0
  • v3.2.0
  • v3.1.1
  • v3.1.0
  • v3.0.0
  • v3.0.0-rc.7
  • v3.0.0-rc.6
  • v3.0.0-rc.5
  • v3.0.0-rc.4
  • v3.0.0-rc.3
  • v3.0.0-rc.2
  • v3.0.0-rc.1
  • v3.0.0-beta.10
  • v3.0.0-beta.9
  • v3.0.0-beta.8
  • v3.0.0-beta.7
  • v3.0.0-beta.6
  • v3.0.0-beta.5
  • v3.0.0-beta.3
41 results

index.js

Blame
  • User.php NaN GiB
    <?php
    
    namespace App\Entity;
    
    use App\Repository\UserRepository;
    use Doctrine\ORM\Mapping as ORM;
    use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
    use Symfony\Component\Security\Core\User\LegacyPasswordAuthenticatedUserInterface;
    use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
    use Symfony\Component\Security\Core\User\UserInterface;
    use Symfony\Component\Validator\Constraints as Assert;
    
    /**
     * @ORM\Entity(repositoryClass=UserRepository::class)
     * @ORM\Table(name="`user`")
     * @UniqueEntity(fields={"email"}, message="email.unique")
     */
    class User implements UserInterface, LegacyPasswordAuthenticatedUserInterface
    {
        /**
         * @ORM\Id
         * @ORM\GeneratedValue
         * @ORM\Column(type="integer")
         */
        private int $id;
    
        /**
         * @ORM\Column(type="string", length=255)
         * @Assert\Email(message = "The email {{ value }} is not a valid email.")
         */
        private string $email;
    
        /**
         * @ORM\Column(type="string", length=255, unique=true)
         */
        private string $email_canonical;
    
        /**
         * @ORM\Column(type="string", name="name")
         */
        private string $lastName;
    
        /**
         * @ORM\Column(type="string", name="firstname")
         */
        private string $firstName;
    
        /**
         * @ORM\Column(type="string")
         */
        private string $username;
    
        /**
         * @ORM\Column(type="string", name="username_canonical", unique=true)
         */
        private string $username_canonical;
    
        /**
         * @ORM\Column(type="boolean", name="credential_expired")
         */
        private bool $credentialExpired = false;
    
        /**
         * @ORM\Column(type="json")
         */
        /** @phpstan-ignore-next-line */
        private array $roles = [];
    
        /**
         * @var string The hashed password
         * @ORM\Column(type="string")
         */
        private string $password;
    
        /**
         * @ORM\Column(type="boolean", name="enabled")
         */
        private bool $isVerified = false;
    
        /**
         * @ORM\Column(type="string", length=255, name="salt")
         */
        private string $salt;
    
        public function getId(): ?int
        {
            return $this->id;
        }
    
        public function getEmail(): string
        {
            return $this->email;
        }
    
        public function setEmail(string $email): self
        {
            $this->email = $email;
            $this->email_canonical = strtolower($email);
            $this->username = $email;
            $this->username_canonical = strtolower($email);
            return $this;
        }
    
        /**
         * A visual identifier that represents this user.
         *
         * @see UserInterface
         */
        public function getUserIdentifier(): string
        {
            return (string) $this->email;
        }
    
        /**
         * @deprecated since Symfony 5.3, use getUserIdentifier instead
         */
        public function getUsername(): string
        {
            return $this->email;
        }
    
        /**
         * @see UserInterface
         */
        public function getRoles(): array
        {
            $roles = $this->roles;
            // guarantee every user at least has ROLE_USER
            $roles[] = 'ROLE_USER';
    
            return array_unique($roles);
        }
    
        /**
         * @param array<string> $roles
         */
        public function setRoles(array $roles): self
        {
            $this->roles = $roles;
    
            return $this;
        }
    
        /**
         * @see PasswordAuthenticatedUserInterface
         */
        public function getPassword(): string
        {
            return $this->password;
        }
    
        public function setPassword(string $password): self
        {
            $this->password = $password;
    
            return $this;
        }
    
        /**
         * Returning a salt is only needed, if you are not using a modern
         * hashing algorithm (e.g. bcrypt or sodium) in your security.yaml.
         *
         * @see UserInterface
         */
        public function getSalt(): string
        {
            return $this->salt;
        }
    
        /**
         * @see UserInterface
         */
        public function eraseCredentials(): void
        {
            // If you store any temporary, sensitive data on the user, clear it here
            // $this->plainPassword = null;
        }
    
        public function isVerified(): bool
        {
            return $this->isVerified;
        }
    
        public function setIsVerified(bool $isVerified): self
        {
            $this->isVerified = $isVerified;
    
            return $this;
        }
    
        public function getFirstName(): string
        {
            return $this->firstName;
        }
    
        public function getLastName(): ?string
        {
            return $this->lastName;
        }
    
        public function setFirstName(string $firstName): void
        {
            $this->firstName = $firstName;
        }
    
        public function setLastName(string $name): void
        {
            $this->lastName = $name;
        }
    
        public function setSalt(string $salt): void
        {
            $this->salt = $salt;
        }
    }