Skip to content

Commit

Permalink
fix: fix verification mail (monicahq/chandler#316)
Browse files Browse the repository at this point in the history
  • Loading branch information
asbiin authored Nov 28, 2022
1 parent 987a8e7 commit 098fa52
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,22 @@ class User extends Authenticatable implements MustVerifyEmail
'help_shown' => 'boolean',
];

/**
* Send the email verification notification.
*
* @return void
*/
public function sendEmailVerificationNotification(): void
{
if (config('mail.default') !== 'smtp' || (
config('mail.mailers.smtp.username') !== null && config('mail.mailers.smtp.password') !== null
)) {
parent::sendEmailVerificationNotification();
} else {
$this->markEmailAsVerified();
}
}

/**
* Get the account record associated with the user.
*
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"posttest": "vendor/bin/phpstan analyse && vendor/bin/psalm",
"test": "vendor/bin/phpunit",
"docker:build": "docker build --cache-from monica-next -t monica-next -f scripts/docker/Dockerfile . && docker image prune -f",
"docker:run": "docker run --name monica -p 8080:80 -e MAIL_MAILER=log monica-next"
"docker:run": "docker run --name monica -p 8080:80 monica-next"
},
"devDependencies": {
"@inertiajs/inertia": "^0.11.0",
Expand Down

0 comments on commit 098fa52

Please sign in to comment.