aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2012-10-30 11:08:32 +0100
committerJörn Friedrich Dreyer <jfd@butonic.de>2012-10-30 11:08:32 +0100
commitb032819ab98ec1b06d66818d5d7a29189bd6720b (patch)
treee8413e7acc982890933fd45a0624fc351484f72e /lib
parent3fdf239b478273155a68ec4ede8d4e4dd54b504d (diff)
downloadnextcloud-server-b032819ab98ec1b06d66818d5d7a29189bd6720b.tar.gz
nextcloud-server-b032819ab98ec1b06d66818d5d7a29189bd6720b.zip
check for database error in userExists
Diffstat (limited to 'lib')
-rw-r--r--lib/user/database.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/user/database.php b/lib/user/database.php
index 25e24fcf7e4..b8c90615067 100644
--- a/lib/user/database.php
+++ b/lib/user/database.php
@@ -172,7 +172,10 @@ class OC_User_Database extends OC_User_Backend {
public function userExists($uid) {
$query = OC_DB::prepare( 'SELECT * FROM `*PREFIX*users` WHERE LOWER(`uid`) = LOWER(?)' );
$result = $query->execute( array( $uid ));
-
+ if (OC_DB::isError($result)) {
+ OC_Log::write('core', OC_DB::getErrorMessage($result), OC_Log::ERROR);
+ return false;
+ }
return $result->numRows() > 0;
}