Skip to content
Snippets Groups Projects
Commit af40d872 authored by Frank Karlitschek's avatar Frank Karlitschek
Browse files

Merge branch 'refactoring' of git.kde.org:owncloud into refactoring

parents fc63882f 7035c041
No related branches found
No related tags found
No related merge requests found
...@@ -165,7 +165,6 @@ CREATE TABLE IF NOT EXISTS `properties` ( ...@@ -165,7 +165,6 @@ CREATE TABLE IF NOT EXISTS `properties` (
CREATE TABLE IF NOT EXISTS `users` ( CREATE TABLE IF NOT EXISTS `users` (
`uid` varchar(64) COLLATE utf8_unicode_ci NOT NULL, `uid` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`password` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `password` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`uid`) PRIMARY KEY (`uid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
......
...@@ -71,7 +71,7 @@ class OC_USER_DATABASE extends OC_USER_BACKEND { ...@@ -71,7 +71,7 @@ class OC_USER_DATABASE extends OC_USER_BACKEND {
* @param string $password The password of the user * @param string $password The password of the user
*/ */
public static function login( $username, $password ){ public static function login( $username, $password ){
$query = OC_DB::prepare( "SELECT `uid`, `name` FROM `*PREFIX*users` WHERE `uid` = ? AND `password` = ?" ); $query = OC_DB::prepare( "SELECT `uid` FROM `*PREFIX*users` WHERE `uid` = ? AND `password` = ?" );
$result = $query->execute( array( $username, sha1( $password ))); $result = $query->execute( array( $username, sha1( $password )));
if( $result->numRows() > 0 ){ if( $result->numRows() > 0 ){
......
...@@ -152,7 +152,7 @@ class OC_DB { ...@@ -152,7 +152,7 @@ class OC_DB {
// Die if we have an error (error means: bad query, not 0 results!) // Die if we have an error (error means: bad query, not 0 results!)
if( PEAR::isError($result)) { if( PEAR::isError($result)) {
$entry = 'DB Error: "'.$result->getMessage().'"<br />'; $entry = 'DB Error: "'.$result->getMessage().'"<br />';
$entry .= 'Offending command was: '.$cmd.'<br />'; $entry .= 'Offending command was: '.$query.'<br />';
error_log( $entry ); error_log( $entry );
die( $entry ); die( $entry );
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment