fixing Roundcube module not using PDO properly
This commit is contained in:
parent
f529ffd7fc
commit
ab573e44ba
|
@ -97,18 +97,21 @@ class m_roundcube {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$req = $dbh->query("SELECT user_id FROM users WHERE username = ?;",array($fullmail));
|
$stmt = $dbh->prepare("SELECT user_id FROM users WHERE username = ?;");
|
||||||
|
$req=$stmt->execute(array($fullmail));
|
||||||
|
|
||||||
|
if ($req) {
|
||||||
foreach ( $req->fetchAll() as $t ) {
|
foreach ( $req->fetchAll() as $t ) {
|
||||||
if (empty($t['user_id'])) continue ;
|
if (empty($t['user_id'])) continue ;
|
||||||
$rcuser_id=$t['user_id'];
|
$rcuser_id=$t['user_id'];
|
||||||
|
|
||||||
$dbh->query("DELETE from contactgroupmembers where contactgroup_id in (select contactgroup_id from contactgroups where user_id = ?) ; ",array($rcuser_id));
|
$dbh->prepare("DELETE from contactgroupmembers where contactgroup_id in (select contactgroup_id from contactgroups where user_id = ?) ; ")->execute(array($rcuser_id));
|
||||||
$dbh->query("DELETE from contactgroups where user_id = ? ; ",array($rcuser_id));
|
$dbh->prepare("DELETE from contactgroups where user_id = ? ; ")->execute(array($rcuser_id));
|
||||||
$dbh->query("DELETE from contacts where user_id = ? ; ",array($rcuser_id));
|
$dbh->prepare("DELETE from contacts where user_id = ? ; ")->execute(array($rcuser_id));
|
||||||
$dbh->query("DELETE from identities where user_id = ? ; ",array($rcuser_id));
|
$dbh->prepare("DELETE from identities where user_id = ? ; ")->execute(array($rcuser_id));
|
||||||
$dbh->query("DELETE from users where user_id = ? ; ",array($rcuser_id));
|
$dbh->prepare("DELETE from users where user_id = ? ; ")->execute(array($rcuser_id));
|
||||||
} //foreach
|
} //foreach
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue