mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 13:57:10 +02:00
Optimized ORM-Structure
This commit is contained in:
@@ -1,26 +1,20 @@
|
||||
<?php
|
||||
namespace App\Entity;
|
||||
|
||||
use Symfony\Component\Security\Core\User\UserInterface;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use App\Entity\Attribut\UsernameAttribut;
|
||||
use App\Entity\Attribut\PasswordAttribut;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author kevinfrantz
|
||||
* @ORM\Table(name="source_user")
|
||||
* @ORM\Entity(repositoryClass="App\Repository\UserRepository")
|
||||
*/
|
||||
class User extends AbstractSource implements UserInterface, \Serializable
|
||||
class User extends AbstractSource implements UserInterface
|
||||
{
|
||||
/**
|
||||
* @ORM\Column(type="string", length=25, unique=true)
|
||||
*/
|
||||
private $username;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=64)
|
||||
*/
|
||||
private $password;
|
||||
|
||||
use UsernameAttribut,PasswordAttribut;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=254, unique=true)
|
||||
*/
|
||||
@@ -38,11 +32,6 @@ class User extends AbstractSource implements UserInterface, \Serializable
|
||||
// $this->salt = md5(uniqid('', true));
|
||||
}
|
||||
|
||||
public function getUsername()
|
||||
{
|
||||
return $this->username;
|
||||
}
|
||||
|
||||
public function getSalt()
|
||||
{
|
||||
// you *may* need a real salt depending on your encoder
|
||||
@@ -50,11 +39,6 @@ class User extends AbstractSource implements UserInterface, \Serializable
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getPassword()
|
||||
{
|
||||
return $this->password;
|
||||
}
|
||||
|
||||
public function getRoles()
|
||||
{
|
||||
return array('ROLE_USER');
|
||||
|
Reference in New Issue
Block a user