mirror of https://github.com/pixelfed/pixelfed.git
Update UserObserver
This commit is contained in:
parent
77cd0f92c5
commit
72d48696ef
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
namespace App\Observers;
|
namespace App\Observers;
|
||||||
|
|
||||||
use App\{Profile, User};
|
use App\{Profile, User, UserSetting};
|
||||||
use App\Jobs\AvatarPipeline\CreateAvatar;
|
use App\Jobs\AvatarPipeline\CreateAvatar;
|
||||||
|
|
||||||
class UserObserver
|
class UserObserver
|
||||||
|
@ -36,6 +36,12 @@ class UserObserver
|
||||||
|
|
||||||
CreateAvatar::dispatch($profile);
|
CreateAvatar::dispatch($profile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(empty($user->settings)) {
|
||||||
|
$settings = new UserSetting;
|
||||||
|
$settings->user_id = $user->id;
|
||||||
|
$settings->save();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue