Skip to content

Commit

Permalink
fix for visitor link: display external url if available
Browse files Browse the repository at this point in the history
  • Loading branch information
tpokorra authored and Wo2OderMehr gehostete App committed Jun 8, 2020
1 parent 4ecadb2 commit 356c1b6
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions app/Http/Controllers/AdminController.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,18 @@ public function index(Request $request)
$participants = \App\Participant::where('tenant_id', $tenant_id)->get();
$tenant = \DB::table('tenants')->where('id', $tenant_id)->first();

$visitor_link = $request->getSchemeAndHttpHost();
// this is not a single instance installation
if (\DB::table('users')->where('tenant_id', "=", 1)->count() == 0)
if (!empty($tenant->external_url))
{
$visitor_link .= "/?uuid=".$tenant->uuid;
$visitor_link = $tenant->external_url;
}
else
{
$visitor_link = $request->getSchemeAndHttpHost();
// this is not a single instance installation
if (\DB::table('users')->where('tenant_id', "=", 1)->count() == 0)
{
$visitor_link .= "/?uuid=".$tenant->uuid;
}
}

$churchname = $tenant->name;
Expand Down

0 comments on commit 356c1b6

Please sign in to comment.