mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Update landing URLs after signup
This commit is contained in:
parent
0993676a05
commit
354c38e4ab
@ -35,7 +35,10 @@ trait VerifiesUserEmail
|
||||
$user = User::where('confirmation_code', request()->confirmation_code)->first();
|
||||
|
||||
if (! $user) {
|
||||
return $this->render('auth.confirmed', ['root' => 'themes', 'message' => ctrans('texts.wrong_confirmation')]);
|
||||
return $this->render('auth.confirmed', [
|
||||
'root' => 'themes',
|
||||
'message' => ctrans('texts.wrong_confirmation'),
|
||||
'redirect_url' => request()->has('react') ? 'https://app.invoicing.co/#/' : url('/')]);
|
||||
}
|
||||
|
||||
$user->email_verified_at = now();
|
||||
@ -46,16 +49,18 @@ trait VerifiesUserEmail
|
||||
return $this->render('auth.confirmed', [
|
||||
'root' => 'themes',
|
||||
'message' => ctrans('texts.security_confirmation'),
|
||||
'redirect_url' => request()->has('react') ? 'https://app.invoicing.co/#/' : url('/'),
|
||||
]);
|
||||
}
|
||||
|
||||
if (is_null($user->password) || empty($user->password) || Hash::check('', $user->password)) {
|
||||
return $this->render('auth.confirmation_with_password', ['root' => 'themes', 'user_id' => $user->hashed_id]);
|
||||
return $this->render('auth.confirmation_with_password', ['root' => 'themes', 'user_id' => $user->hashed_id, 'redirect_url' => request()->has('react') ? 'https://app.invoicing.co/#/' : url('/')]);
|
||||
}
|
||||
|
||||
return $this->render('auth.confirmed', [
|
||||
'root' => 'themes',
|
||||
'message' => ctrans('texts.security_confirmation'),
|
||||
'redirect_url' => request()->has('react') ? 'https://app.invoicing.co/#/' : url('/'),
|
||||
]);
|
||||
}
|
||||
|
||||
@ -84,7 +89,7 @@ trait VerifiesUserEmail
|
||||
return $this->render('auth.confirmed', [
|
||||
'root' => 'themes',
|
||||
'message' => ctrans('texts.security_confirmation'),
|
||||
'redirect_url' => request()->hasHeader('X-React') ? 'https://app.invoicing.co/#/' : url('/'),
|
||||
'redirect_url' => request()->has('react') ? 'https://app.invoicing.co/#/' : url('/'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@ -42,10 +42,16 @@ class VerifyUserObject
|
||||
$this->user->confirmation_code = $this->createDbHash($this->company->db);
|
||||
$this->user->save();
|
||||
|
||||
$react_redirect = '';
|
||||
|
||||
if(Ninja::isHosted()) {
|
||||
$react_redirect = '?react=true';
|
||||
}
|
||||
|
||||
$data = [
|
||||
'title' => ctrans('texts.confirmation_subject'),
|
||||
'message' => ctrans('texts.confirmation_message'),
|
||||
'url' => url("/user/confirm/{$this->user->confirmation_code}"),
|
||||
'url' => url("/user/confirm/{$this->user->confirmation_code}".$react_redirect),
|
||||
'button' => ctrans('texts.button_confirmation_message'),
|
||||
'settings' => $this->company->settings,
|
||||
'logo' => $this->company->present()->logo(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user