mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fix for upgrading directly after signing up
This commit is contained in:
parent
4a6673b25e
commit
6217419a2f
@ -258,14 +258,17 @@ class UserController extends BaseController
|
|||||||
|
|
||||||
return Redirect::to("/password/reset/{$token}");
|
return Redirect::to("/password/reset/{$token}");
|
||||||
} else {
|
} else {
|
||||||
|
if (Auth::check()) {
|
||||||
if (Session::has(REQUESTED_PRO_PLAN)) {
|
if (Session::has(REQUESTED_PRO_PLAN)) {
|
||||||
Session::forget(REQUESTED_PRO_PLAN);
|
Session::forget(REQUESTED_PRO_PLAN);
|
||||||
$invitation = $this->accountRepo->enableProPlan();
|
$url = '/settings/account_management?upgrade=true';
|
||||||
|
|
||||||
return Redirect::to($invitation->getLink());
|
|
||||||
} else {
|
} else {
|
||||||
return Redirect::to(Auth::check() ? '/dashboard' : '/login')->with('message', $notice_msg);
|
$url = '/dashboard';
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$url = '/login';
|
||||||
|
}
|
||||||
|
return Redirect::to($url)->with('message', $notice_msg);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$error_msg = trans('texts.security.wrong_confirmation');
|
$error_msg = trans('texts.security.wrong_confirmation');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user