Merge branch 'issue-42' into 'develop'

Send mail to new users

See merge request ldc-web/projets/support-web!65
This commit is contained in:
Vincent BRIDIER 2023-10-12 09:12:36 +00:00
commit 09356e6ee4

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);