#84 - add comment to observer

This commit is contained in:
Adrian Hopek 2022-03-21 14:10:57 +01:00
parent c5dffa60e9
commit 8f9e006eac

View File

@ -13,6 +13,10 @@ class UserObserver
{
public function creating(User $user): void
{
/**
* A random password for user is generated because AuthenticateSession middleware needs a user's password
* for some checks. Users use Google to login, so they don't need to know the password (GitHub issue #84)
*/
$user->password = Hash::make(Str::random(40));
}