Merge commit 'refs/merge-requests/109' of git://gitorious.org/owncloud/owncloud into merge-requests/109

This commit is contained in:
Daniel 2012-05-06 16:13:13 +02:00
commit 35177e00c0
2 changed files with 3 additions and 3 deletions

View File

@ -457,7 +457,7 @@ class OC_Migrate{
); );
// Add hash if user export // Add hash if user export
if( self::$exporttype == 'user' ){ if( self::$exporttype == 'user' ){
$query = OC_DB::prepare( "SELECT password FROM *PREFIX*users WHERE uid LIKE ?" ); $query = OC_DB::prepare( "SELECT password FROM *PREFIX*users WHERE uid = ?" );
$result = $query->execute( array( self::$uid ) ); $result = $query->execute( array( self::$uid ) );
$row = $result->fetchRow(); $row = $result->fetchRow();
$hash = $row ? $row['password'] : false; $hash = $row ? $row['password'] : false;

View File

@ -122,7 +122,7 @@ class OC_User_Database extends OC_User_Backend {
* Check if the password is correct without logging in the user * Check if the password is correct without logging in the user
*/ */
public function checkPassword( $uid, $password ){ public function checkPassword( $uid, $password ){
$query = OC_DB::prepare( "SELECT uid, password FROM *PREFIX*users WHERE uid LIKE ?" ); $query = OC_DB::prepare( "SELECT uid, password FROM *PREFIX*users WHERE uid = ?" );
$result = $query->execute( array( $uid)); $result = $query->execute( array( $uid));
$row=$result->fetchRow(); $row=$result->fetchRow();
@ -172,7 +172,7 @@ class OC_User_Database extends OC_User_Backend {
* @return boolean * @return boolean
*/ */
public function userExists($uid){ public function userExists($uid){
$query = OC_DB::prepare( "SELECT * FROM `*PREFIX*users` WHERE uid LIKE ?" ); $query = OC_DB::prepare( "SELECT * FROM `*PREFIX*users` WHERE uid = ?" );
$result = $query->execute( array( $uid )); $result = $query->execute( array( $uid ));
return $result->numRows() > 0; return $result->numRows() > 0;