Fixes Logins

This commit is contained in:
Refringe 2024-06-01 23:51:22 -04:00
parent 414e91d198
commit b45b6cb1e5
Signed by: Refringe
GPG Key ID: 7715B85B4A6306ED
2 changed files with 31 additions and 26 deletions

View File

@ -109,7 +109,7 @@ class ImportWoltlabData extends Command
'hub_id' => $wolt->userID,
'name' => $wolt->username,
'email' => mb_convert_case($wolt->email, MB_CASE_LOWER, 'UTF-8'),
'password' => $wolt->password,
'password' => $this->cleanPasswordHash($wolt->password),
'created_at' => $registrationDate,
'updated_at' => now('UTC')->toDateTimeString(),
];
@ -128,6 +128,12 @@ class ImportWoltlabData extends Command
$this->info('Total users processed: '.$totalInserted);
}
protected function cleanPasswordHash(string $password): string
{
// The WoltLab password hash sometimes? has a prefix of the hash type. We only want the hash.
return str_replace(['Bcrypt:', 'cryptMD5:', 'cryptMD5::'], '', $password);
}
protected function importLicenses(): void
{
$totalInserted = 0;

View File

@ -19,9 +19,6 @@
</div>
<div class="hidden sm:flex sm:items-center sm:ms-6">
{{-- Settings Dropdown --}}
<div class="ms-3 relative">
{{-- Theme Toggle Button --}}
<button id="theme-toggle" type="button" class="text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 rounded-lg text-sm p-2.5">
<svg id="theme-toggle-dark-icon" class="hidden w-5 h-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
@ -32,14 +29,17 @@
</svg>
</button>
@guest()
<div class="ml-4">
<a href="{{ route('login') }}" class="text-sm font-semibold leading-6 text-gray-900">Log in <span aria-hidden="true">&rarr;</span></a>
</div>
@endguest
{{-- Settings Dropdown --}}
<div class="ms-3 relative">
<x-dropdown align="right" width="48">
<x-slot name="trigger">
@auth()
@if (Laravel\Jetstream\Jetstream::managesProfilePhotos())
<button class="flex text-sm border-2 border-transparent dark:border-gray-700 rounded-full focus:outline-none focus:border-gray-300 dark:focus:border-gray-700 transition">
<img class="h-8 w-8 rounded-full object-cover" src="{{ Auth::user()->profile_photo_url }}" alt="{{ Auth::user()->name }}"/>
</button>
@else
<span class="inline-flex rounded-md">
<button type="button" class="inline-flex items-center px-3 py-2 border border-transparent text-sm leading-4 font-medium rounded-md text-gray-500 dark:text-gray-300 bg-white dark:bg-gray-800 hover:text-gray-700 dark:hover:text-gray-500 focus:outline-none focus:bg-gray-50 dark:focus:bg-gray-700 active:bg-gray-50 dark:active:bg-gray-700 transition ease-in-out duration-150">
{{ Auth::user()->name }}
@ -49,7 +49,6 @@
</svg>
</button>
</span>
@endif
@endauth
</x-slot>