mirror of https://github.com/pixelfed/pixelfed.git
Merge pull request #530 from pixelfed/frontend-ui-refactor
Update AuthLogin
This commit is contained in:
commit
33265f960d
|
@ -31,7 +31,7 @@ class RegisterController extends Controller
|
|||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectTo = '/home';
|
||||
protected $redirectTo = '/';
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace App\Listeners;
|
||||
|
||||
use DB;
|
||||
use App\User;
|
||||
use App\UserSetting;
|
||||
use Illuminate\Queue\InteractsWithQueue;
|
||||
|
@ -29,9 +30,11 @@ class AuthLogin
|
|||
{
|
||||
$user = $event->user;
|
||||
if (empty($user->settings)) {
|
||||
$settings = new UserSetting();
|
||||
$settings->user_id = $user->id;
|
||||
$settings->save();
|
||||
DB::transaction(function() use($user) {
|
||||
UserSetting::firstOrCreate([
|
||||
'user_id' => $user->id
|
||||
]);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue