Implemented e-mail confirmations

This commit is contained in:
2018-07-31 22:42:08 +02:00
parent df0e06045f
commit 904e29955d
13 changed files with 270 additions and 27 deletions
+30
View File
@@ -23,6 +23,36 @@
<main class="py-4">
<div class="container">
{{-- Warning about not activated account --}}
@auth
@if(!user()->confirmed)
<div class="alert alert-warning alert-important" role="alert" >
<button type="button" class="close" data-dismiss="alert" aria-hidden="true" >&times;</button>
Your account is not activated yet, some options are locked!<br/>
@if(user()->emailConfirmations()->valid()->exists())
{{--
There is a pending confirmation, whose e-mail may differ from what
the user has saved in the rpofile (due to email change attempt)
--}}
Check your e-mail (<u>{{user()->emailConfirmations()->valid()->first()->email}}</u>) for the confirmation link, or <a href="{{route('resend-email-confirmation')}}">request a new one</a>.
The confirmation message could fall into your Spam folder.<br>
If this address is not correct, you can fix it in your <a href="{{route('account.edit')}}">account settings</a>.
@else
{{-- There are no pending confirmations --}}
@if(user()->email)
{{-- User has e-mail set in the profile, probably from registration --}}
You can confirm your e-mail (<u>{{$user->email}}</u>) by <a href="{{route('resend-email-confirmation')}}">requesting a confirmation link</a>.
If this address is not correct, you can fix it in your <a href="{{route('account.edit')}}">account settings</a>.
@else
{{-- User has no e-mail, maybe registered through a provider without e-mails --}}
Set your e-mail in <a href="{{route('account.edit')}}">account settings</a> and you
will receive a confirmation link.
@endif
@endif
</div>
@endif
@endauth
@include('flash::message')
@yield('content')
</div>