From 2d9f902cef313baaf7ab9351a922977febd369ec Mon Sep 17 00:00:00 2001 From: Alan Garcia Date: Thu, 7 Feb 2013 17:49:05 +0000 Subject: [PATCH] Devrait fixer #1350 . MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A vérifier --- roundcube/class/m_roundcube.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/roundcube/class/m_roundcube.php b/roundcube/class/m_roundcube.php index 0d6819d6..e944fab9 100644 --- a/roundcube/class/m_roundcube.php +++ b/roundcube/class/m_roundcube.php @@ -93,10 +93,18 @@ class m_roundcube { break; } + $req = $dbh->query("SELECT user_id FROM users WHERE username = '$fullmail'"); - $count = $dbh->query("select * from session ;"); - $count2 = $count->fetchAll(); - // FIXME faire les vraie requetes de suppression + foreach ( $req->fetchAll() as $t ) { + if (empty($t['user_id'])) continue ; + $rcuser_id=$t['user_id']; + + $dbh->query("DELETE from contactgroupmembers where contactgroup_id in (select contactgroup_id from contactgroups where user_id = $rcuser_id) ; "); + $dbh->query("DELETE from contactgroups where user_id = $rcuser_id ; "); + $dbh->query("DELETE from contacts where user_id = $rcuser_id ; "); + $dbh->query("DELETE from identities where user_id = $rcuser_id ; "); + $dbh->query("DELETE from users where user_id = $rcuser_id ; "); + } //foreach }