gmarche/src/Auth/User.php

136 lines
2.0 KiB
PHP

<?php
namespace App\Auth;
class User implements \Framework\Auth\User
{
public $id;
public $username;
public $email;
public $password;
// public $firstname;
// public $lastname;
public $passwordReset;
public $passwordResetAt;
/**
* @return mixed
*/
public function getFirstname()
{
return $this->firstname;
}
/**
* @return mixed
*/
public function getLastname()
{
return $this->lastname;
}
/**
* @return string
*/
public function getUsername(): string
{
return $this->username;
}
/**
* @return string[]
*/
public function getRoles(): array
{
return [];
}
/**
* @return mixed
*/
public function getPasswordReset()
{
return $this->passwordReset;
}
/**
* @param mixed $passwordReset
*/
public function setPasswordReset($passwordReset)
{
$this->passwordReset = $passwordReset;
}
public function setPasswordResetAt($date)
{
if (is_string($date)) {
$this->passwordResetAt = new \DateTime($date);
} else {
$this->passwordResetAt = $date;
}
}
/**
* @return mixed
*/
public function getPasswordResetAt(): ?\DateTime
{
return $this->passwordResetAt;
}
/**
* @return mixed
*/
public function getEmail()
{
return $this->email;
}
/**
* @param mixed $email
*/
public function setEmail($email)
{
$this->email = $email;
}
/**
* @return mixed
*/
public function getPassword()
{
return $this->password;
}
/**
* @param mixed $password
*/
public function setPassword($password)
{
$this->password = $password;
}
/**
* @return mixed
*/
public function getId()
{
return $this->id;
}
/**
* @param mixed $id
*/
public function setId($id)
{
$this->id = $id;
}
}