Support Forums - Classified Ads Script Osclass

Osclass theme support => Veronika Osclass Responsive Theme => Topic started by: oscman on April 02, 2017, 05:37:29 PM

Title: [BUG] user can't delete account
Post by: oscman on April 02, 2017, 05:37:29 PM
Hello. When i delete my account it says it was successfuly deleted but the user is not deleted, i have backoffice manager pro and i have checked allow users to delete account
Title: Re: [BUG] user can't delete account
Post by: MB Themes on April 02, 2017, 08:34:43 PM
@oscman
If you remove user from oc-admin, does it work without problem?
Is this problem related to backoffice manager plugin or to veronika theme?
Title: Re: [BUG] user can't delete account
Post by: oscman on April 03, 2017, 10:53:32 AM
From oc-admin it works. I am not sure if its because of veronika or backoffice
Title: Re: [BUG] user can't delete account
Post by: MB Themes on April 03, 2017, 11:22:22 AM
@oscman
It is problem of backoffice manager plugin.
Go to index.php of this plugin and find this line:
Code: [Select]
echo '<li class="opt_del_user"><a href="' . osc_base_url() . 'oc-content/plugins/backoffice_manager/delete_user.php?user_id=' . $user_id . '&secret=' . $user['s_secret'] . '" onclick="return confirm(\''  .__('Are you sure you want to delete your account? \nNote that all your listings will be deleted too! \n\nWould you like to continue', 'backoffice_manager') . '?\')">' . __('Delete account', 'backoffice_manager') . '</a></li>';
Replace it with:
Code: [Select]
echo '<li class="opt_del_user"><a href="' . osc_base_url(true) . '?page=user&action=delete&id='.osc_user_id().'&secret='.$user['s_secret'] . '" onclick="return confirm(\''  .__('Are you sure you want to delete your account? \nNote that all your listings will be deleted too! \n\nWould you like to continue', 'backoffice_manager') . '?\')">' . __('Delete account', 'backoffice_manager') . '</a></li>';
Title: Re: [BUG] user can't delete account
Post by: oscman on April 03, 2017, 12:06:05 PM
Thank you it works
Title: Re: [BUG] user can't delete account
Post by: VS on August 29, 2023, 06:11:42 PM
I also cant delete user from oc admin.
Why every time have new problem with osclass?
I need go to online with my site, but I have problems again.
What need to to check what is problem?
Also cant delete users from base.
I need urgently help!
Title: Re: [BUG] user can't delete account
Post by: MB Themes on August 29, 2023, 11:18:18 PM
Most probably some blocking foreign key.
Go to database and try to remove that user from t_user table manually.
You should see error that tells which foreign key blocks it.
Uodate that key to ON DELETE CASCADE