@Vlad7
Notice you reference to is related to user account removal link, not to listing.
Could be simply fixed by modifying this:
echo '<li class="opt_del_user"><a href="' . osc_base_url(true) . '?page=user&action=delete&id='.$user_id.'&secret='.$user['s_secret'] . '" onclick="return confirm(\'' . osc_esc_js(__('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>';
Into:
if($user_id > 0 && isset($user['s_secret']) {
//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(\'' . osc_esc_js(__('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>';
echo '<li class="opt_del_user"><a href="' . osc_base_url(true) . '?page=user&action=delete&id='.$user_id.'&secret='.$user['s_secret'] . '" onclick="return confirm(\'' . osc_esc_js(__('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>';
}
in index.php of plugin.
Please tell me how to change here?
function bo_delete_user() {
$allow_delete = osc_get_preference('bo_mgr_allow_delete_user_account', 'plugin-bo_mgr') <> '' ? osc_get_preference('bo_mgr_allow_delete_user_account', 'plugin-bo_mgr') : 1;
if($allow_delete == 1) {
$user_id = osc_logged_user_id();
$user = User::newInstance()->findByPrimaryKey( $user_id );
//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(\'' . osc_esc_js(__('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>';
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(\'' . osc_esc_js(__('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>';
}
}
osc_add_hook('user_menu', 'bo_delete_user');