diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2013-05-08 16:18:24 +0200 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2013-05-22 13:59:07 +0200 |
commit | cbd5eb9a1a77a5bcbcb843be21e95bccec26dedb (patch) | |
tree | f97cca1e2d9363d4e5f60d372f1dc0a6c6ede029 /lib/user.php | |
parent | eceb3c8ed5f3068808bc8fc5ceec5fda1ac50db9 (diff) | |
download | nextcloud-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.php | 6 |
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')); |