Skip to content

Commit

Permalink
Implemented requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
spitfire305 committed Feb 6, 2024
1 parent c8cf5c6 commit 13d90a1
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion app/Http/Controllers/User/EmailValidationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,20 @@

class EmailValidationController extends Controller
{

/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth');
}

public function validateEmail(Request $request, User $user)
{
if (!(auth()->check() && auth()->user()->id == $user->id)) {
if (auth()->user()->id != $user->id) {
return response()->redirectTo(route('settings.subscription'))->withError(__('emails/validation.error'));
}

Expand Down

0 comments on commit 13d90a1

Please sign in to comment.