summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/user_ldap/lib/helper.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/user_ldap/lib/helper.php b/apps/user_ldap/lib/helper.php
index 07d13a806a6..10ed40ebd6a 100644
--- a/apps/user_ldap/lib/helper.php
+++ b/apps/user_ldap/lib/helper.php
@@ -118,7 +118,13 @@ class Helper {
return false;
}
- $query = \OCP\DB::prepare('TRUNCATE '.$table);
+ if(strpos(\OCP\Config::getSystemValue('dbtype'), 'sqlite') !== false) {
+ $query = \OCP\DB::prepare('DELETE FROM '.$table);
+ } else {
+ $query = \OCP\DB::prepare('TRUNCATE '.$table);
+ }
+
+
$res = $query->execute();
if(\OCP\DB::isError($res)) {