mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Add extra logout delete check
This commit is contained in:
parent
7bb6a7945a
commit
b680891929
@ -173,13 +173,17 @@ class AuthController extends Controller
|
|||||||
public function getLogoutWrapper()
|
public function getLogoutWrapper()
|
||||||
{
|
{
|
||||||
if (Auth::check() && ! Auth::user()->registered) {
|
if (Auth::check() && ! Auth::user()->registered) {
|
||||||
$account = Auth::user()->account;
|
if (request()->force_logout) {
|
||||||
$this->accountRepo->unlinkAccount($account);
|
$account = Auth::user()->account;
|
||||||
|
$this->accountRepo->unlinkAccount($account);
|
||||||
|
|
||||||
if (! $account->hasMultipleAccounts()) {
|
if (! $account->hasMultipleAccounts()) {
|
||||||
$account->company->forceDelete();
|
$account->company->forceDelete();
|
||||||
|
}
|
||||||
|
$account->forceDelete();
|
||||||
|
} else {
|
||||||
|
return redirect('/');
|
||||||
}
|
}
|
||||||
$account->forceDelete();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$response = self::getLogout();
|
$response = self::getLogout();
|
||||||
|
@ -266,7 +266,7 @@ $LANG = array(
|
|||||||
'working' => 'Working',
|
'working' => 'Working',
|
||||||
'success' => 'Success',
|
'success' => 'Success',
|
||||||
'success_message' => 'You have successfully registered! Please visit the link in the account confirmation email to verify your email address.',
|
'success_message' => 'You have successfully registered! Please visit the link in the account confirmation email to verify your email address.',
|
||||||
'erase_data' => 'This will permanently erase your data.',
|
'erase_data' => 'Your account is not registered, this will permanently erase your data.',
|
||||||
'password' => 'Password',
|
'password' => 'Password',
|
||||||
'pro_plan_product' => 'Pro Plan',
|
'pro_plan_product' => 'Pro Plan',
|
||||||
'pro_plan_success' => 'Thanks for choosing Invoice Ninja\'s Pro plan!<p/> <br/>
|
'pro_plan_success' => 'Thanks for choosing Invoice Ninja\'s Pro plan!<p/> <br/>
|
||||||
@ -2437,6 +2437,7 @@ $LANG = array(
|
|||||||
'online_payment_discount' => 'Online Payment Discount',
|
'online_payment_discount' => 'Online Payment Discount',
|
||||||
'created_new_company' => 'Successfully created new company',
|
'created_new_company' => 'Successfully created new company',
|
||||||
'fees_disabled_for_gateway' => 'Fees are disabled for this gateway.',
|
'fees_disabled_for_gateway' => 'Fees are disabled for this gateway.',
|
||||||
|
'logout_and_delete' => 'Log Out/Delete Account',
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (force || NINJA.isRegistered) {
|
if (force || NINJA.isRegistered) {
|
||||||
window.location = '{{ URL::to('logout') }}';
|
window.location = '{{ URL::to('logout') }}' + (force ? '?force_logout=true' : '');
|
||||||
} else {
|
} else {
|
||||||
$('#logoutModal').modal('show');
|
$('#logoutModal').modal('show');
|
||||||
}
|
}
|
||||||
|
@ -267,7 +267,7 @@
|
|||||||
<button type="button" class="btn btn-default" id="closeSignUpButton" data-dismiss="modal">{{ trans('texts.close') }} <i class="glyphicon glyphicon-remove-circle"></i></button>
|
<button type="button" class="btn btn-default" id="closeSignUpButton" data-dismiss="modal">{{ trans('texts.close') }} <i class="glyphicon glyphicon-remove-circle"></i></button>
|
||||||
<button type="button" class="btn btn-primary" id="saveSignUpButton" onclick="validateServerSignUp()" disabled>{{ trans('texts.save') }} <i class="glyphicon glyphicon-floppy-disk"></i></button>
|
<button type="button" class="btn btn-primary" id="saveSignUpButton" onclick="validateServerSignUp()" disabled>{{ trans('texts.save') }} <i class="glyphicon glyphicon-floppy-disk"></i></button>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -281,14 +281,18 @@
|
|||||||
<h4 class="modal-title" id="myModalLabel">{{ trans('texts.logout') }}</h4>
|
<h4 class="modal-title" id="myModalLabel">{{ trans('texts.logout') }}</h4>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="container">
|
<div class="container" style="width: 100%; padding-bottom: 0px !important">
|
||||||
<h3>{{ trans('texts.are_you_sure') }}</h3>
|
<div class="panel panel-default" style="margin-bottom: 2px">
|
||||||
|
<div class="panel-body">
|
||||||
|
<h3>{{ trans('texts.are_you_sure') }}</h3><br/>
|
||||||
<p>{{ trans('texts.erase_data') }}</p>
|
<p>{{ trans('texts.erase_data') }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="modal-footer" id="signUpFooter">
|
<div class="modal-footer" id="signUpFooter">
|
||||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('texts.cancel') }}</button>
|
<button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('texts.cancel') }}</button>
|
||||||
<button type="button" class="btn btn-danger" onclick="logout(true)">{{ trans('texts.logout') }}</button>
|
<button type="button" class="btn btn-danger" onclick="logout(true)">{{ trans('texts.logout_and_delete') }}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user