mirror of
https://github.com/nextcloud/server.git
synced 2024-08-09 14:13:00 +02:00
check for database error in userExists
This commit is contained in:
parent
3fdf239b47
commit
b032819ab9
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user