mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
Check usernames in the database as case insensitive, they are still stored case sensitive. Bug fix for oc-422 and oc-1514
This commit is contained in:
parent
e05db00468
commit
ff076caeee
1 changed files with 2 additions and 2 deletions
|
|
@ -121,7 +121,7 @@ class OC_User_Database extends OC_User_Backend {
|
|||
* 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();
|
||||
|
|
@ -170,7 +170,7 @@ class OC_User_Database extends OC_User_Backend {
|
|||
* @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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue