* returns the user id or false
*/
public function checkPassword( $uid, $password ){
- $query = OC_DB::prepare( 'SELECT `uid`, `password` FROM `*PREFIX*users` WHERE `uid` = ?' );
+ $query = OC_DB::prepare( 'SELECT `uid`, `password` FROM `*PREFIX*users` WHERE LOWER(`uid`) = LOWER(?)' );
$result = $query->execute( array( $uid));
$row=$result->fetchRow();
* @return boolean
*/
public function userExists($uid){
- $query = OC_DB::prepare( 'SELECT * FROM `*PREFIX*users` WHERE `uid` = ?' );
+ $query = OC_DB::prepare( 'SELECT * FROM `*PREFIX*users` WHERE LOWER(`uid`) = LOWER(?)' );
$result = $query->execute( array( $uid ));
return $result->numRows() > 0;