mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-25 15:55:22 +00:00
Update UserObserver
This commit is contained in:
parent
77cd0f92c5
commit
72d48696ef
1 changed files with 7 additions and 1 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace App\Observers;
|
||||
|
||||
use App\{Profile, User};
|
||||
use App\{Profile, User, UserSetting};
|
||||
use App\Jobs\AvatarPipeline\CreateAvatar;
|
||||
|
||||
class UserObserver
|
||||
|
@ -36,6 +36,12 @@ class UserObserver
|
|||
|
||||
CreateAvatar::dispatch($profile);
|
||||
}
|
||||
|
||||
if(empty($user->settings)) {
|
||||
$settings = new UserSetting;
|
||||
$settings->user_id = $user->id;
|
||||
$settings->save();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue