Skip to content

Commit 6f6e260

Browse files
committed
Fixed for current system
1 parent 590f5b4 commit 6f6e260

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

app/Http/Controllers/UserController.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,7 @@ public function deleteUser(request $request)
673673
public function delProfilePicture()
674674
{
675675
$user_id = Auth::user()->id;
676+
$user_id = User::find($user_id)->littlelink_name; // remove when switching to IDs
676677
$path = base_path('img/' . $user_id . '.png');
677678

678679
if (File::exists($path)) {

resources/views/studio/page.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
@csrf
2727
@if($page->littlelink_name != '')
2828
<div class="form-group col-lg-8">
29-
<label>Logo</label>@if(file_exists(base_path("img/" . Auth::user()->id . ".png")))<a title="Remove icon" class="hvr-grow p-1 text-danger" style="padding-left:5px;" href="{{ route('delProfilePicture') }}"><i class="bi bi-trash-fill"></i></a>@endif
29+
<label>Logo</label>@if(file_exists(base_path("img/" . $page->littlelink_name . ".png")))<a title="Remove icon" class="hvr-grow p-1 text-danger" style="padding-left:5px;" href="{{ route('delProfilePicture') }}"><i class="bi bi-trash-fill"></i></a>@endif
3030
<input type="file" accept="image/jpeg,image/jpg,image/png" class="form-control-file" name="image">
3131
</div>
3232
@endif

0 commit comments

Comments
 (0)