diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.php index 0fa5e13e38..f6990e2845 100644 --- a/app/Http/Controllers/AccountController.php +++ b/app/Http/Controllers/AccountController.php @@ -113,7 +113,7 @@ class AccountController extends BaseController event(new UserSignedUp()); event(new UserLoggedIn()); - $redirectTo = Input::get('redirect_to', 'invoices/create'); + $redirectTo = Input::get('redirect_to') ?: 'invoices/create'; return Redirect::to($redirectTo)->with('sign_up', Input::get('sign_up')); } diff --git a/app/Models/Invitation.php b/app/Models/Invitation.php index 6b56cbdbd1..8e6f58c94c 100644 --- a/app/Models/Invitation.php +++ b/app/Models/Invitation.php @@ -40,7 +40,7 @@ class Invitation extends EntityModel if ($iframe_url) { return "{$iframe_url}/?{$this->invitation_key}"; } else if ($this->account->subdomain) { - $url = Utils::replaceSubdomain($url, $this->subdomain); + $url = Utils::replaceSubdomain($url, $this->account->subdomain); } return "{$url}/view/{$this->invitation_key}";