Devrait fixer #1350 .

A vérifier
This commit is contained in:
Alan Garcia 2013-02-07 17:49:05 +00:00
parent 1e72ecb62a
commit 2d9f902cef
1 changed files with 11 additions and 3 deletions

View File

@ -93,10 +93,18 @@ class m_roundcube {
break; break;
} }
$req = $dbh->query("SELECT user_id FROM users WHERE username = '$fullmail'");
$count = $dbh->query("select * from session ;"); foreach ( $req->fetchAll() as $t ) {
$count2 = $count->fetchAll(); if (empty($t['user_id'])) continue ;
// FIXME faire les vraie requetes de suppression $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
} }