Multiuser support for social icons

This commit is contained in:
Julian Prieber 2022-12-05 20:43:29 +01:00
parent 1d48f8706b
commit 42d2fabd55
2 changed files with 2 additions and 3 deletions

View File

@ -83,7 +83,7 @@ class UserController extends Controller
return abort(404);
}
$userinfo = User::select('name', 'littlelink_name', 'littlelink_description', 'theme')->where('id', $id)->first();
$userinfo = User::select('id', 'name', 'littlelink_name', 'littlelink_description', 'theme')->where('id', $id)->first();
$information = User::select('name', 'littlelink_name', 'littlelink_description', 'theme')->where('id', $id)->get();
$links = DB::table('links')->join('buttons', 'buttons.id', '=', 'links.button_id')->select('links.link', 'links.id', 'links.button_id', 'links.title', 'links.custom_css', 'links.custom_icon', 'buttons.name')->where('user_id', $id)->orderBy('up_link', 'asc')->orderBy('order', 'asc')->get();

View File

@ -265,7 +265,7 @@ function get_operating_system() {
<p style="width:50%;min-width:300px;" class="fadein">@if(env('ALLOW_USER_HTML') === true){!! $info->littlelink_description !!}@else{{ $info->littlelink_description }}@endif</p>
<!-- Icons -->
@php $icons = DB::table('links')->where('user_id', 1)->where('button_id', 94)->get(); @endphp
@php $icons = DB::table('links')->where('user_id', $userinfo->id)->where('button_id', 94)->get(); @endphp
<div class="row fadein social-icon-div">
@foreach($icons as $icon)
<a class="social-hover social-link" href="{{$icon->link}}"><i class="social-icon fa-brands fa-{{$icon->title}}"></i></a>
@ -273,7 +273,6 @@ function get_operating_system() {
</div>
@endforeach
<!-- Buttons -->
<?php function strp($urlStrp){return str_replace(array('http://', 'https://'), '', $urlStrp);} ?>