fix: user email can be null when oauth

This commit is contained in:
Maël Gangloff
2024-07-22 14:52:16 +02:00
parent 3d7a6fbcfd
commit ec1bbf3b05
2 changed files with 45 additions and 3 deletions

View File

@@ -2,7 +2,6 @@
namespace App\Entity;
use ApiPlatform\Metadata\ApiProperty;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use App\Controller\MeController;
@@ -50,7 +49,7 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
/**
* @var string|null The hashed password
*/
#[ORM\Column]
#[ORM\Column(nullable: true)]
private ?string $password = null;
/**
@@ -119,7 +118,7 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
/**
* @see PasswordAuthenticatedUserInterface
*/
public function getPassword(): string
public function getPassword(): ?string
{
return $this->password;
}