add disabled account profile

This commit is contained in:
vedatakd 2020-04-15 03:35:04 +03:00
parent 188ccb3b54
commit 9d3dc4bb0f
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

@ -1,11 +1,11 @@
<?php <?php
return [ return [
"email" => "Eposta alanı zorunludur!", "email" => "Eposta alanı zorunludur!",
"username" => "Kullanıcı Adı alanı zorunludur!", "username" => "Kullanıcı Adı alanı zorunludur!",
"success_update" => "Profil Başarıyla Güncellendi!", "success_update" => "Profil Başarıyla Güncellendi!",
"adress_success_update" => "Adres Başarıyla Güncellendi!", "adress_success_update" => "Adres Başarıyla Güncellendi!",
"adress_success_create" => "Adres Başarıyla Oluşturuldu!", "adress_success_create" => "Adres Başarıyla Oluşturuldu!",
"login_error" => "Giriş Bilgileri Hatalıdır.", "login_error" => "Giriş Bilgileri Hatalıdır.",
"login_noMail_old_user" => "Girdiğiniz e-posta adresi bulunamadı.", "login_noMail_old_user" => "Girdiğiniz e-posta adresi bulunamadı.",
"login_noMail_old_user2" => "Lütfen e-posta adresini kontrol edip tekrar deneyin.", "login_noMail_old_user2" => "Lütfen e-posta adresini kontrol edip tekrar deneyin.",
@ -16,7 +16,7 @@ return [
"notified_about_ads" => "Reklamlarım hakkında bildirimlere izin ver", "notified_about_ads" => "Reklamlarım hakkında bildirimlere izin ver",
"receive_messages_email" => "Mesajları e-posta olarak almak istiyorum", "receive_messages_email" => "Mesajları e-posta olarak almak istiyorum",
"no_packages_module" => "Paket Modülü Bulunamadı!", "no_packages_module" => "Paket Modülü Bulunamadı!",
"required_add"=> "Lütfen gerekli tüm satırları doldurun.", "required_add" => "Lütfen gerekli tüm satırları doldurun.",
"no_extend_package" => "İlan Yayınlama Süresi paketiniz bulunamadı.", "no_extend_package" => "İlan Yayınlama Süresi paketiniz bulunamadı.",
"saved" => "Kayıt Edildi!", "saved" => "Kayıt Edildi!",
'please_confirm_transaction' => 'Lütfen işlemi onaylayın', 'please_confirm_transaction' => 'Lütfen işlemi onaylayın',
@ -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

@ -79,7 +79,7 @@ class MyProfileController extends PublicController
$country = CountryModel::all(); $country = CountryModel::all();
return $this->view->make('visiosoft.module.profile::profile.detail', return $this->view->make('visiosoft.module.profile::profile.detail',
compact('user','country', 'form', 'advs_count')); compact('user', 'country', 'form', 'advs_count'));
} }
@ -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('/');
} }