mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
add signup checks to flutter routes
This commit is contained in:
parent
442bad25bf
commit
c0e3d2e677
@ -778,8 +778,13 @@ class BaseController extends Controller
|
||||
}
|
||||
|
||||
/* Clean up URLs and remove query parameters from the URL*/
|
||||
if(request()->has('login') && request()->input('login') == 'true')
|
||||
return redirect('/')->with(['login' => "true"]);
|
||||
if (request()->has('login') && request()->input('login') == 'true') {
|
||||
return redirect('/')->with(['login' => 'true']);
|
||||
}
|
||||
|
||||
if (request()->has('signup') && request()->input('signup') == 'true') {
|
||||
return redirect('/')->with(['signup' => 'true']);
|
||||
}
|
||||
|
||||
$data = [];
|
||||
|
||||
@ -789,10 +794,16 @@ class BaseController extends Controller
|
||||
//pass referral code to front end
|
||||
$data['rc'] = request()->has('rc') ? request()->input('rc') : '';
|
||||
$data['build'] = request()->has('build') ? request()->input('build') : '';
|
||||
$data['login'] = request()->has('login') ? request()->input('login') : "false";
|
||||
|
||||
if(request()->session()->has('login'))
|
||||
$data['login'] = "true";
|
||||
$data['login'] = request()->has('login') ? request()->input('login') : 'false';
|
||||
$data['signup'] = request()->has('signup') ? request()->input('signup') : 'false';
|
||||
|
||||
if (request()->session()->has('login')) {
|
||||
$data['login'] = 'true';
|
||||
}
|
||||
|
||||
if(request()->session()->has('signup')){
|
||||
$data['signup'] = 'true';
|
||||
}
|
||||
|
||||
$data['user_agent'] = request()->server('HTTP_USER_AGENT');
|
||||
|
||||
|
@ -378,4 +378,12 @@ class NinjaMailerJob implements ShouldQueue
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this the cleanest way to requeue a job?
|
||||
*
|
||||
* $this->delete();
|
||||
*
|
||||
* $job = NinjaMailerJob::dispatch($this->nmo, $this->override)->delay(3600);
|
||||
*/
|
||||
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html data-report-errors="{{ $report_errors }}" data-rc="{{ $rc }}" data-user-agent="{{ $user_agent }}" data-login="{{ $login }}">
|
||||
<html data-report-errors="{{ $report_errors }}" data-rc="{{ $rc }}" data-user-agent="{{ $user_agent }}" data-login="{{ $login }}" data-login="{{ $signup }}">
|
||||
<head>
|
||||
<!-- Source: https://github.com/invoiceninja/invoiceninja -->
|
||||
<!-- Version: {{ config('ninja.app_version') }} -->
|
||||
|
Loading…
x
Reference in New Issue
Block a user