]> Raphaƫl G. Git Repositories - userbundle/blobdiff - Entity/User.php
Set mail as optional
[userbundle] / Entity / User.php
index 8103ea6bcd111d26ad5592eb046022f5ce3ed89e..7d274f9f48ecf8b171a848bbd1d9a41aec5f0732 100644 (file)
@@ -83,7 +83,7 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface {
         *
         * @param ?string $mail The user mail
         */
         *
         * @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;
                //With mail
                if ($mail !== null && !empty($mail)) {
                        $this->mail = $mail;