mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-10 00:34:50 +00:00
Update AuthLogin listener
This commit is contained in:
parent
c819bfe351
commit
abc738a532
1 changed files with 5 additions and 0 deletions
|
@ -25,6 +25,11 @@ class AuthLogin
|
||||||
public function handle($event)
|
public function handle($event)
|
||||||
{
|
{
|
||||||
$user = $event->user;
|
$user = $event->user;
|
||||||
|
|
||||||
|
if(!$user) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (empty($user->settings)) {
|
if (empty($user->settings)) {
|
||||||
DB::transaction(function() use($user) {
|
DB::transaction(function() use($user) {
|
||||||
UserSetting::firstOrCreate([
|
UserSetting::firstOrCreate([
|
||||||
|
|
Loading…
Reference in a new issue