aboutsummaryrefslogtreecommitdiffstats
path: root/lib/User
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-04-17 12:35:58 +0200
committerRobin Appelman <icewind1991@gmail.com>2011-04-17 12:36:14 +0200
commit58cb46c4e85ff4af41d91522e8fcba89e01fed81 (patch)
tree6da43b03ea183be8d56f7d63ab44fbc30a5ec93d /lib/User
parent243d6566ddbf8c1e8b544aa51bec590b8dfea2e2 (diff)
downloadnextcloud-server-58cb46c4e85ff4af41d91522e8fcba89e01fed81.tar.gz
nextcloud-server-58cb46c4e85ff4af41d91522e8fcba89e01fed81.zip
make sql queries work in sqlite
Diffstat (limited to 'lib/User')
-rw-r--r--lib/User/database.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/User/database.php b/lib/User/database.php
index 533cadbb95c..9a059c1b235 100644
--- a/lib/User/database.php
+++ b/lib/User/database.php
@@ -49,7 +49,7 @@ class OC_USER_DATABASE extends OC_USER_BACKEND {
* @param string $password The password of the new user
*/
public static function createUser( $uid, $password ){
- $query = OC_DB::prepare( "SELECT * FROM `*PREFIX*users` WHERE `uid` = ?" );
+ $query = OC_DB::prepare( "SELECT * FROM `*PREFIX*users` WHERE uid = ?" );
$result = $query->execute( array( $uid ));
// Check if the user already exists
if ( $result->numRows() > 0 ){
@@ -69,7 +69,7 @@ class OC_USER_DATABASE extends OC_USER_BACKEND {
* @param string $username The username of the user to delete
*/
public static function deleteUser( $uid ){
- $query = OC_DB::prepare( "DELETE FROM `*PREFIX*users` WHERE `uid` = ?" );
+ $query = OC_DB::prepare( "DELETE FROM `*PREFIX*users` WHERE uid = ?" );
$result = $query->execute( array( $uid ));
return true;
@@ -131,7 +131,7 @@ class OC_USER_DATABASE extends OC_USER_BACKEND {
* @param string $password The new password for the user
*/
public static function setPassword( $username, $password ){
- $query = OC_DB::prepare( "UPDATE `*PREFIX*users` SET `password` = ? WHERE `uid` = ?" );
+ $query = OC_DB::prepare( "UPDATE *PREFIX*users SET password = ? WHERE uid = ?" );
$result = $query->execute( array( sha1( $password ), $username ));
if( $result->numRows() > 0 ){
@@ -149,7 +149,7 @@ class OC_USER_DATABASE extends OC_USER_BACKEND {
* @param string $password Password of the user
*/
public static function checkPassword( $username, $password ){
- $query = OC_DB::prepare( "SELECT `uid` 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 )));
if( $result->numRows() > 0 ){
@@ -165,7 +165,7 @@ class OC_USER_DATABASE extends OC_USER_BACKEND {
*
*/
public static function getUsers(){
- $query = OC_DB::prepare( "SELECT `uid` FROM `*PREFIX*users`" );
+ $query = OC_DB::prepare( "SELECT uid FROM *PREFIX*users" );
$result = $query->execute();
$users=array();