Client can't see entries in the recycle bin

Discussion in 'General' started by flykip, Dec 19, 2005.

  1. flykip

    flykip New Member

    If I login as client I can create a database for my site, if I then delete the database I can't see anything in the recycle bin.
    If I login as administrator it's there.
    Log back in as client and the recycle bin still shows no entries, but if I click on the [Empty recycle bin] link it does delete it.

    The same happens if I create and delete email users.

    Regards
    Brian
     
  2. react

    react New Member

    Bump because I am seeing the same issue. Any resolution here?
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    Have you created the email users as admin or client?
     
  4. react

    react New Member

    I have tried both ways, creating e-mail users when logged in as admin and then when logged in as client. In both cases admin and reseller can see the entries in the recycle bin but client cannot. When client empties recycle bin the e-mail account is deleted though.
     
  5. react

    react New Member

    Taking a look at the logic in isp_kunde/edit/papierkorb.php I see the SQL is as follows:

    SELECT tree_id,title,icon,type,doctype_id,doc_id from ".$go_info["modul"]["table_name"]."_nodes where status = '0' and userid = '$userid'"

    Unfortunately in thise case $userid is being derived from $_REQUEST["userid"] which is not being passed to the script and is therefore coming in as 0. Looking instead at isp_manager/edit/empty_trash.php which has working SQL we see the following:

    SELECT * FROM ".$go_info["modul"]["table_name"]."_nodes where status = 0 and userid = ".$go_info["user"]["userid"])

    If I use $go_info["user"]["userid"] instead of $userid in isp_kunde/edit/papierkorb.php it appears to work correctly. Can someone who is more familiar with the code explain which is correct and perhaps why papierkorb.php is not being passed $userid?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    This is the correct query. We will fix it in the next update.
     

Share This Page