diff --git a/app/Http/Controllers/ClientAuth/LoginController.php b/app/Http/Controllers/ClientAuth/LoginController.php index c2fee0afb1..b99503d5aa 100644 --- a/app/Http/Controllers/ClientAuth/LoginController.php +++ b/app/Http/Controllers/ClientAuth/LoginController.php @@ -39,7 +39,7 @@ class LoginController extends Controller */ public function __construct() { - $this->middleware('guest:client', ['except' => 'logout']); + $this->middleware('guest:client', ['except' => 'getLogoutWrapper']); } /** @@ -170,4 +170,16 @@ class LoginController extends Controller return view('clientauth.sessionexpired')->with(['clientauth' => true]); } + /** + * @return \Illuminate\Http\Response + */ + public function getLogoutWrapper(Request $request) + { + $contactKey = session('contact_key'); + + self::logout($request); + + return redirect('/client/dashboard/' . $contactKey); + } + } diff --git a/resources/views/public/header.blade.php b/resources/views/public/header.blade.php index e48b95406f..1dedadc5f2 100644 --- a/resources/views/public/header.blade.php +++ b/resources/views/public/header.blade.php @@ -119,6 +119,11 @@ {!! link_to('/client/credits', trans('texts.credits') ) !!} @endif + @if ($account->enable_portal_password && request()->contact->password) +