mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-10 00:34:50 +00:00
34 lines
644 B
PHP
34 lines
644 B
PHP
<?php
|
|
|
|
namespace App\Events;
|
|
|
|
use App\User;
|
|
use App\UserSetting;
|
|
use Illuminate\Broadcasting\InteractsWithSockets;
|
|
use Illuminate\Foundation\Events\Dispatchable;
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
class AuthLoginEvent
|
|
{
|
|
use Dispatchable, InteractsWithSockets, SerializesModels;
|
|
|
|
/**
|
|
* Create a new event instance.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function __construct()
|
|
{
|
|
//
|
|
}
|
|
|
|
public function handle(User $user)
|
|
{
|
|
if (empty($user->settings)) {
|
|
$settings = new UserSetting();
|
|
$settings->user_id = $user->id;
|
|
$settings->save();
|
|
}
|
|
}
|
|
}
|