summaryrefslogtreecommitdiffstats
path: root/lib/user.php
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2013-05-08 16:18:24 +0200
committerJörn Friedrich Dreyer <jfd@butonic.de>2013-05-22 13:59:07 +0200
commitcbd5eb9a1a77a5bcbcb843be21e95bccec26dedb (patch)
treef97cca1e2d9363d4e5f60d372f1dc0a6c6ede029 /lib/user.php
parenteceb3c8ed5f3068808bc8fc5ceec5fda1ac50db9 (diff)
downloadnextcloud-server-cbd5eb9a1a77a5bcbcb843be21e95bccec26dedb.tar.gz
nextcloud-server-cbd5eb9a1a77a5bcbcb843be21e95bccec26dedb.zip
use to_char only for oracle, whitespace
Diffstat (limited to 'lib/user.php')
-rw-r--r--lib/user.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/user.php b/lib/user.php
index 78f5edfb5f6..32b91c35efc 100644
--- a/lib/user.php
+++ b/lib/user.php
@@ -609,7 +609,11 @@ class OC_User {
*/
public static function isEnabled($userid) {
$sql = 'SELECT `userid` FROM `*PREFIX*preferences`'
- .' WHERE `userid` = ? AND `appid` = ? AND `configkey` = ? AND to_char(`configvalue`) = ?';
+ .' WHERE `userid` = ? AND `appid` = ? AND `configkey` = ? AND `configvalue` = ?';
+ if (OC_Config::getValue( 'dbtype', 'sqlite' ) === 'oci') { //FIXME oracle hack
+ $sql = 'SELECT `userid` FROM `*PREFIX*preferences`'
+ .' WHERE `userid` = ? AND `appid` = ? AND `configkey` = ? AND to_char(`configvalue`) = ?';
+ }
$stmt = OC_DB::prepare($sql);
if ( ! OC_DB::isError($stmt) ) {
$result = $stmt->execute(array($userid, 'core', 'enabled', 'false'));