Your IP : 216.73.217.79


Current Path : /var/www/v3.cesa.co.za/src/UserBundle/Entity/
Upload File :
Current File : /var/www/v3.cesa.co.za/src/UserBundle/Entity/UserOld.php

<?php

namespace App\UserBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
use Symfony\Component\Security\Core\User\UserInterface;

/**
 * PHPMaker7 admin user (echasl23).
 *
 * @ORM\Table(name="echasl23")
 * @ORM\Entity(repositoryClass="App\UserBundle\Repository\UserOldRepository")
 */
class UserOld implements UserInterface, PasswordAuthenticatedUserInterface
{
    /**
     * Plain password for forms; never persisted.
     */
    private ?string $plainPassword = null;

    /**
     * Resolved once per request lifecycle.
     *
     * @var list<string>|null
     */
    private ?array $roles = null;

    /**
     * @ORM\Id
     * @ORM\Column(name="adminuserid", type="integer")
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;

    /**
     * @ORM\Column(name="adminusername", type="string", length=255, unique=true)
     */
    private $username;

    /**
     * @ORM\Column(name="adminpassword", type="string", length=255)
     */
    private $password;

    /**
     * @ORM\Column(name="email", type="string", length=255, nullable=true)
     */
    private $email_address;

    /**
     * @ORM\Column(name="level", type="integer", options={"default": 0})
     */
    private $access_level;

    /**
     * @ORM\Column(name="profile", type="text", nullable=true)
     */
    private $profile;

    /**
     * @ORM\Column(name="activated", type="boolean")
     */
    private $activated;

    /**
     * @ORM\Column(name="pwdchanged", type="datetime", nullable=true)
     */
    private $pwdchanged;

    public function getId(): ?int
    {
        return $this->id;
    }

    public function getUsername(): ?string
    {
        return $this->username;
    }

    public function setUsername(string $username): static
    {
        $this->username = $username;

        return $this;
    }

    public function getPassword(): ?string
    {
        return $this->password;
    }

    public function setPassword(string $password): static
    {
        $this->password = $password;

        return $this;
    }

    public function getEmailAddress(): ?string
    {
        return $this->email_address;
    }

    public function setEmailAddress(?string $email_address): static
    {
        $this->email_address = $email_address;

        return $this;
    }

    public function getAccessLevel(): ?int
    {
        return $this->access_level;
    }

    public function setAccessLevel(int $access_level): static
    {
        $this->access_level = $access_level;

        return $this;
    }

    public function getProfile(): ?string
    {
        return $this->profile;
    }

    public function setProfile(?string $profile): static
    {
        $this->profile = $profile;

        return $this;
    }

    public function isActivated(): ?bool
    {
        return $this->activated;
    }

    public function setActivated(bool $activated): static
    {
        $this->activated = $activated;

        return $this;
    }

    public function getPwdchanged(): ?\DateTimeInterface
    {
        return $this->pwdchanged;
    }

    public function setPwdchanged(?\DateTimeInterface $pwdchanged): static
    {
        $this->pwdchanged = $pwdchanged;

        return $this;
    }

    public function getPlainPassword(): ?string
    {
        return $this->plainPassword;
    }

    public function setPlainPassword(?string $plainPassword): static
    {
        $this->plainPassword = $plainPassword;

        return $this;
    }

    public function getUserIdentifier(): string
    {
        return (string) $this->username;
    }

    /**
     * @param list<string> $roles
     */
    public function setResolvedRoles(array $roles): void
    {
        $this->roles = $roles;
    }

    /**
     * @return list<string>
     */
    public function getRoles(): array
    {
        return $this->roles ?? ['NONE'];
    }

    public function eraseCredentials(): void
    {
        $this->plainPassword = null;
    }

    public function __toString(): string
    {
        return (string) $this->username;
    }
}