Merge pull request #153 from butonic/master

check for database error in userExists
This commit is contained in:
Lukas Reschke 2012-10-30 10:17:39 -07:00
commit 6738275b01
1 changed files with 4 additions and 1 deletions

View File

@ -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;
}