summaryrefslogtreecommitdiffstats
path: root/lib/user/database.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/user/database.php')
-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;
}