mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-01-09 14:07:25 +01:00
Added Plain Password Attribute
This commit is contained in:
parent
2e3cd98640
commit
dffea5d3b9
29
application/src/Entity/Attribut/PlainPasswordAttribute.php
Normal file
29
application/src/Entity/Attribut/PlainPasswordAttribute.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
namespace App\Entity\Attribut;
|
||||
use Symfony\Component\Validator\Constraints as Assert;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*
|
||||
*/
|
||||
trait PlainPasswordAttribute {
|
||||
|
||||
/**
|
||||
*
|
||||
* @Assert\NotBlank()
|
||||
* @Assert\Length(max=4096)
|
||||
*/
|
||||
private $plainPassword;
|
||||
|
||||
public function getPlainPassword(): ?string
|
||||
{
|
||||
return $this->plainPassword;
|
||||
}
|
||||
|
||||
public function setPlainPassword($password): void
|
||||
{
|
||||
$this->plainPassword = $password;
|
||||
}
|
||||
}
|
||||
|
@ -4,6 +4,7 @@ namespace App\Entity;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use App\Entity\Attribut\UsernameAttribut;
|
||||
use App\Entity\Attribut\PasswordAttribut;
|
||||
use App\Entity\Attribut\PlainPasswordAttribute;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -13,7 +14,7 @@ use App\Entity\Attribut\PasswordAttribut;
|
||||
*/
|
||||
class User extends AbstractSource implements UserInterface
|
||||
{
|
||||
use UsernameAttribut,PasswordAttribut;
|
||||
use UsernameAttribut,PasswordAttribut,PlainPasswordAttribute;
|
||||
|
||||
/**
|
||||
* @ORM\Column(name="is_active", type="boolean")
|
||||
|
Loading…
Reference in New Issue
Block a user