mirror of
https://github.com/LinkStackOrg/LinkStack.git
synced 2025-04-10 00:21:37 +02:00
Changed profile picture save method to use user id
Changed profile picture to use user id instead of username to save it. If merged, this will reset all current profile pictures on the instance.
This commit is contained in:
parent
c0c4397cd8
commit
5b23fa08de
@ -526,7 +526,7 @@ class UserController extends Controller
|
||||
User::where('id', $userId)->update(['littlelink_name' => $pageName, 'littlelink_description' => $pageDescription, 'name' => $name]);
|
||||
|
||||
if ($request->hasFile('image')) {
|
||||
$profilePhoto->move(base_path('/img'), $littlelink_name . ".png");
|
||||
$profilePhoto->move(base_path('/img'), $userId . ".png");
|
||||
}
|
||||
|
||||
return Redirect('/studio/page');
|
||||
|
@ -250,8 +250,8 @@ function get_operating_system() {
|
||||
<div class="row">
|
||||
<div class="column" style="margin-top: 5%">
|
||||
<!-- Your Image Here -->
|
||||
@if(file_exists(base_path("img/$littlelink_name" . ".png" )))
|
||||
<img alt="avatar" class="rounded-avatar fadein" src="{{ asset("img/$littlelink_name" . ".png") }}" width="128px" height="128px" style="object-fit: cover;">
|
||||
@if(file_exists(base_path("img/" . $userinfo->id . ".png")))
|
||||
<img alt="avatar" class="rounded-avatar fadein" src="{{ asset("img/" . $userinfo->id . ".png") }}" width="128px" height="128px" style="object-fit: cover;">
|
||||
@elseif(file_exists(base_path("littlelink/images/").findFile('avatar')))
|
||||
<img alt="avatar" class="rounded-avatar fadein" src="{{ asset('littlelink/images/'.findFile('avatar')) }}" srcset="{{ asset('littlelink/images/avatar@2x.png 2x') }}" width="128px" height="128px" style="object-fit: cover;">
|
||||
@else
|
||||
|
@ -28,8 +28,8 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group col-lg-8">
|
||||
@if(file_exists(base_path("img/$user->littlelink_name" . ".png" )))
|
||||
<img src="{{ asset("img/$user->littlelink_name" . ".png") }}" srcset="{{ asset("img/$user->littlelink_name" . "@2x.png 2x") }}" width="128px" height="128px" style="object-fit: cover;">
|
||||
@if(file_exists(base_path("img/" . $user->id . ".png")))
|
||||
<img src="{{ asset("img/" . $user->id . ".png") }}" srcset="{{ asset("img/$user->littlelink_name" . "@2x.png 2x") }}" width="128px" height="128px" style="object-fit: cover;">
|
||||
@elseif(file_exists(base_path("littlelink/images/").findFile('avatar')))
|
||||
<img class="rounded-avatar" src="{{ asset('littlelink/images/'.findFile('avatar')) }}" srcset="{{ asset('littlelink/images/avatar@2x.png 2x') }}" width="128px" height="128px" style="object-fit: cover;">
|
||||
@else
|
||||
|
@ -32,8 +32,8 @@
|
||||
@endif
|
||||
|
||||
<div class="form-group col-lg-8">
|
||||
@if(file_exists(base_path("img/$page->littlelink_name" . ".png" )))
|
||||
<img src="{{ asset("img/$page->littlelink_name" . ".png") }}" style="width: 75px; height: 75px; border-radius: 50%; object-fit: cover;">
|
||||
@if(file_exists(base_path("img/" . Auth::user()->id . ".png")))
|
||||
<img src="{{ asset("img/" . Auth::user()->id . ".png") }}" style="width: 75px; height: 75px; border-radius: 50%; object-fit: cover;">
|
||||
@else
|
||||
@if(!empty($page->image))
|
||||
<img src="{{ $page->image }}" style="width: 75px; height: 75px; object-fit: cover;">
|
||||
@ -58,7 +58,7 @@
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">{{ url('') }}/@</div>
|
||||
</div>
|
||||
<input type="text" class="form-control" name="pageName" value="{{ $page->littlelink_name ?? '' }}" required>
|
||||
<input type="text" class="form-control" name="littlelink_name" value="{{ $page->littlelink_name ?? '' }}" required>
|
||||
</div>
|
||||
|
||||
<label style="margin-top:15px">Display name</label>
|
||||
@ -66,7 +66,7 @@
|
||||
{{-- <div class="input-group-prepend">
|
||||
<div class="input-group-text">Name:</div>
|
||||
</div> --}}
|
||||
<input type="text" class="form-control" name="Name" value="{{ $page->name }}" required>
|
||||
<input type="text" class="form-control" name="name" value="{{ $page->name }}" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user