Confirm mail is now send to every newly created user

This commit is contained in:
Noah Lancien 2023-09-25 17:35:14 +02:00
parent 13c1c304d3
commit f5a3353d09

View file

@ -85,6 +85,9 @@ class User extends Authenticatable
}
Cache::flush('AdminUsers');
});
static::created(function (User $user) {
$user->sendMailConfirm();
});
static::updating(function (User $user) {
if (Hash::needsRehash($user->password)) {
$user->password = Hash::make($user->password);