Allow changing email, username and password
This commit is contained in:
@@ -7,17 +7,33 @@
|
||||
<p class="mt-1 text-sm text-gray-600 dark:text-gray-400">
|
||||
{{ __('Ensure your account is using a long, random password to stay secure.') }}
|
||||
</p>
|
||||
|
||||
@if ($user->discord_id && is_null($user->password))
|
||||
<div class="p-2 rounded-lg bg-rose-600/80 mt-4">
|
||||
<p class="p-2 text-sm dark:text-gray-200 text-white">
|
||||
{{ __('You currently don\'t have a password set, as you use Discord authentication. You can set a password to be able to login with email & password.') }}
|
||||
</p>
|
||||
</div>
|
||||
@elseif ($user->discord_id && !is_null($user->password))
|
||||
<div class="p-2 rounded-lg bg-green-600/80 mt-4">
|
||||
<p class="p-2 text-sm dark:text-gray-200 text-white">
|
||||
{{ __('Both Discord and email login are enabled.') }}
|
||||
</p>
|
||||
</div>
|
||||
@endif
|
||||
</header>
|
||||
|
||||
<form method="post" action="{{ route('password.update') }}" class="mt-6 space-y-6">
|
||||
@csrf
|
||||
@method('put')
|
||||
|
||||
@if (!(is_null($user->password) && $user->discord_id))
|
||||
<div>
|
||||
<x-input-label for="update_password_current_password" :value="__('Current Password')" />
|
||||
<x-text-input id="update_password_current_password" name="current_password" type="password" class="mt-1 block w-full" autocomplete="current-password" />
|
||||
<x-input-error :messages="$errors->updatePassword->get('current_password')" class="mt-2" />
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div>
|
||||
<x-input-label for="update_password_password" :value="__('New Password')" />
|
||||
|
||||
@@ -4,9 +4,19 @@
|
||||
{{ __('Profile Information') }}
|
||||
</h2>
|
||||
|
||||
<p class="mt-1 text-sm text-gray-600 dark:text-gray-400">
|
||||
{{ __("Update your account's profile information and email address.") }}
|
||||
</p>
|
||||
@if ($user->discord_id)
|
||||
<div class="p-2 rounded-lg bg-rose-600/80 mt-4">
|
||||
<p class="p-2 text-sm dark:text-gray-200 text-white">
|
||||
{{ __('Changing your name or email will not affect Discord authentication, as your Discord ID has been stored.') }}
|
||||
</p>
|
||||
</div>
|
||||
@else
|
||||
<div class="p-2 rounded-lg bg-green-600/80 mt-4">
|
||||
<p class="p-2 text-sm dark:text-gray-200 text-white">
|
||||
{{ __('If you want to use Discord authentication, ensure the email addresses match for initial login. After login with Discord, email can be changed.') }}
|
||||
</p>
|
||||
</div>
|
||||
@endif
|
||||
</header>
|
||||
|
||||
<form id="send-verification" method="post" action="{{ route('verification.send') }}">
|
||||
@@ -19,13 +29,13 @@
|
||||
|
||||
<div>
|
||||
<x-input-label for="name" :value="__('Name')" />
|
||||
<x-text-input id="name" name="name" type="text" class="mt-1 block w-full" :value="old('name', $user->name)" required autofocus autocomplete="name" disabled />
|
||||
<x-text-input id="name" name="name" type="text" class="mt-1 block w-full" :value="old('name', $user->name)" required autofocus autocomplete="name" />
|
||||
<x-input-error class="mt-2" :messages="$errors->get('name')" />
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<x-input-label for="email" :value="__('Email')" />
|
||||
<x-text-input id="email" name="email" type="email" class="mt-1 block w-full" :value="old('email', $user->email)" required autocomplete="email" disabled />
|
||||
<x-text-input id="email" name="email" type="email" class="mt-1 block w-full" :value="old('email', $user->email)" required autocomplete="email" />
|
||||
<x-input-error class="mt-2" :messages="$errors->get('email')" />
|
||||
|
||||
@if ($user instanceof \Illuminate\Contracts\Auth\MustVerifyEmail && ! $user->hasVerifiedEmail())
|
||||
@@ -47,7 +57,7 @@
|
||||
@endif
|
||||
</div>
|
||||
|
||||
{{-- <div class="flex items-center gap-4">
|
||||
<div class="flex items-center gap-4">
|
||||
<x-primary-button>{{ __('Save') }}</x-primary-button>
|
||||
|
||||
@if (session('status') === 'profile-updated')
|
||||
@@ -59,6 +69,6 @@
|
||||
class="text-sm text-gray-600 dark:text-gray-400"
|
||||
>{{ __('Saved.') }}</p>
|
||||
@endif
|
||||
</div> --}}
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user