Merge pull request #486 from openclassify/vedat

add disabled account profile
This commit is contained in:
Fatih Alp 2020-04-15 09:32:22 +03:00 committed by GitHub
commit d96e915b36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 28 additions and 9 deletions

View File

@ -29,5 +29,7 @@ return [
'empty_password_sms_message' => 'Due to security issues, we changed your password! Your new password is:', 'empty_password_sms_message' => 'Due to security issues, we changed your password! Your new password is:',
// Forgot Password // Forgot Password
'email_phone_not_found' => 'The E-mail, Phone Number is not correct!' 'email_phone_not_found' => 'The E-mail, Phone Number is not correct!',
'disable_account' => 'Do you want to close your account? This operation cannot be undone.',
]; ];

View File

@ -29,5 +29,8 @@ return [
'empty_password_sms_message' => 'Güvenlik sorunları nedeniyle şifrenizi değiştirdik! Yeni parolanız:', 'empty_password_sms_message' => 'Güvenlik sorunları nedeniyle şifrenizi değiştirdik! Yeni parolanız:',
// Forgot Password // Forgot Password
'email_phone_not_found' => 'E-posta, Telefon Numarası doğru değil!' 'email_phone_not_found' => 'E-posta, Telefon Numarası doğru değil!',
'disable_account' => 'Hesabınızı kapatmak istiyor musunuz? Bu işlem geri alınamaz.',
]; ];

View File

@ -26,6 +26,10 @@
</div> </div>
</nav> </nav>
<div class="bg-dark p-2 mt-2 rounded"> <div class="bg-dark p-2 mt-2 rounded">
<a href="/advs/create_adv" class="btn btn-success">
<i class="fas fa-plus-circle"></i>
{{ trans("theme::button.post_ad.name") }}
</a>
<a href="{{ url_route("advs::extendAll") }}" class="btn btn-primary"> <a href="{{ url_route("advs::extendAll") }}" class="btn btn-primary">
{{ trans('visiosoft.module.profile::button.extend_all') }} {{ trans('visiosoft.module.profile::button.extend_all') }}
</a> </a>

View File

@ -86,6 +86,15 @@
{{ userForm.actions|raw }} {{ userForm.actions|raw }}
</div> </div>
{{ userForm.close()|raw }} {{ userForm.close()|raw }}
<div class="col-12">
<label class="text-muted">
{{ trans('visiosoft.module.profile::message.disable_account') }}
</label>
<button type="button" class="btn btn-danger float-right"
onclick="window.location.href='/profile/closeAccount'">{{ trans("visiosoft.module.profile::field.disable_account.name") }}</button>
</div>
</div> </div>
</div> </div>

View File

@ -306,6 +306,7 @@ class MyProfileController extends PublicController
{ {
UsersUsersEntryModel::query()->find(Auth::id())->update(['enabled' => 0]); UsersUsersEntryModel::query()->find(Auth::id())->update(['enabled' => 0]);
Auth::logout();
return redirect('/'); return redirect('/');
} }