diff --git a/app/Actions/Fortify/CreateNewUser.php b/app/Actions/Fortify/CreateNewUser.php index 6e129ed3..522e10e2 100644 --- a/app/Actions/Fortify/CreateNewUser.php +++ b/app/Actions/Fortify/CreateNewUser.php @@ -5,6 +5,7 @@ namespace App\Actions\Fortify; use App\Models\Prospecto; use App\Models\User; use Illuminate\Auth\Notifications\ResetPassword; +use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Password; use Illuminate\Support\Facades\Validator; @@ -68,6 +69,8 @@ class CreateNewUser implements CreatesNewUsers session()->flash('registro_exitoso', 'Tu cuenta ha sido creada. Revisa tu correo electrónico para activar tu acceso.'); + Auth::logout(); + return $user; } } diff --git a/app/Providers/FortifyServiceProvider.php b/app/Providers/FortifyServiceProvider.php index 4a0f42ad..3a29b61f 100644 --- a/app/Providers/FortifyServiceProvider.php +++ b/app/Providers/FortifyServiceProvider.php @@ -18,6 +18,7 @@ use Laravel\Fortify\Fortify; use App\Models\User; use Illuminate\Support\Facades\Hash; use Illuminate\Validation\ValidationException; +use Laravel\Fortify\Contracts\RegisterResponse; class FortifyServiceProvider extends ServiceProvider { @@ -46,7 +47,7 @@ class FortifyServiceProvider extends ServiceProvider return view('auth.register', [ 'plantels' => $plantels ]); - }); + }); Fortify::authenticateUsing(function (Request $request) { @@ -79,5 +80,15 @@ class FortifyServiceProvider extends ServiceProvider RateLimiter::for('two-factor', function (Request $request) { return Limit::perMinute(5)->by($request->session()->get('login.id')); }); + + $this->app->singleton(RegisterResponse::class, function () { + return new class implements RegisterResponse { + public function toResponse($request) + { + return redirect()->route('login') + ->with('registro_exitoso', 'Tu cuenta ha sido creada. Revisa tu correo electrónico para activar tu acceso.'); + } + }; +}); } } diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index c0934141..5431919e 100644 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -79,6 +79,17 @@ @include('layouts._partials.scripts') @livewireScripts @yield('scripts') + +@if (session('registro_exitoso')) + +@endif diff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.php index ecdfc058..24964780 100644 --- a/resources/views/auth/register.blade.php +++ b/resources/views/auth/register.blade.php @@ -59,7 +59,7 @@
- +
@@ -102,18 +102,6 @@ Swal.fire({ @endif -@if (session('registro_exitoso')) - -@endif diff --git a/resources/views/vendor/mail/html/header.blade.php b/resources/views/vendor/mail/html/header.blade.php index 4c25865d..5ec461b6 100644 --- a/resources/views/vendor/mail/html/header.blade.php +++ b/resources/views/vendor/mail/html/header.blade.php @@ -3,7 +3,9 @@ @if (trim($slot) === 'Laravel') - +
+ Sistema Educativo CUIEP +
@else {!! $slot !!} @endif diff --git a/resources/views/vendor/notifications/email.blade.php b/resources/views/vendor/notifications/email.blade.php index 96b50fe8..09cce6d1 100644 --- a/resources/views/vendor/notifications/email.blade.php +++ b/resources/views/vendor/notifications/email.blade.php @@ -1,10 +1,4 @@ - -{{-- Logo / encabezado --}} -
- Sistema Educativo CUIEP -
- # Activación de cuenta Estimado/a **{{ $notifiable->name ?? 'estudiante' }}**,