]> Raphaël G. Git Repositories - userbundle/commitdiff
Set mail as optional 0.2.2
authorRaphaël Gertz <git@rapsys.eu>
Fri, 13 Jan 2023 02:16:05 +0000 (03:16 +0100)
committerRaphaël Gertz <git@rapsys.eu>
Fri, 13 Jan 2023 02:16:05 +0000 (03:16 +0100)
Entity/User.php

index 8103ea6bcd111d26ad5592eb046022f5ce3ed89e..7d274f9f48ecf8b171a848bbd1d9a41aec5f0732 100644 (file)
@@ -83,7 +83,7 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface {
         *
         * @param ?string $mail The user mail
         */
-       public function __construct(?string $mail) {
+       public function __construct(?string $mail = null) {
                //With mail
                if ($mail !== null && !empty($mail)) {
                        $this->mail = $mail;