aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2010-06-11 00:40:42 +0200
committerRobin Appelman <icewind1991@gmail.com>2010-06-11 00:40:42 +0200
commit3c19e66151e5a18359668fdcd14cede299ae4129 (patch)
treea25f4cf5e792a5dd73115eed232232ca94282955
parentb9f7a4d95570c3cebc46770bac62e739692e6606 (diff)
downloadnextcloud-server-3c19e66151e5a18359668fdcd14cede299ae4129.tar.gz
nextcloud-server-3c19e66151e5a18359668fdcd14cede299ae4129.zip
fix changing password when using sqlite
-rwxr-xr-xinc/lib_user.php2
-rwxr-xr-xinc/templates/configform.php1
2 files changed, 2 insertions, 1 deletions
diff --git a/inc/lib_user.php b/inc/lib_user.php
index 86ef53df669..e5d994dd02f 100755
--- a/inc/lib_user.php
+++ b/inc/lib_user.php
@@ -252,7 +252,7 @@ class OC_USER {
public static function setpassword($username,$password){
$password=sha1($password);
$userid=OC_USER::getuserid($username);
- $query="UPDATE users SET user_password = '$password' WHERE user_id =$userid LIMIT 1 ;";
+ $query="UPDATE users SET user_password = '$password' WHERE user_id ='$userid'";
$result=OC_DB::query($query);
if($result){
return true;
diff --git a/inc/templates/configform.php b/inc/templates/configform.php
index f9abaad8966..709e8f14296 100755
--- a/inc/templates/configform.php
+++ b/inc/templates/configform.php
@@ -30,6 +30,7 @@ changepassset=function(){
<tr><td>change password:</td><td><input onchange='changepassset()' id='changepass' type="checkbox" name="changepass" size="30" class="formstyle" value='1'></input></td></tr>
<tr style='display:none' id='new_password'><td>new password:</td><td><input type="password" name="password" size="30" class="formstyle"></input></td></tr>
<tr style='display:none' id='new_password_retype'><td>retype admin password:</td><td><input type="password" name="password2" size="30" class="formstyle"></input></td></tr>
+<tr><td></td><td><input type='submit' value='save' class='formstyle'/></td></tr>
</table>
</form>
<!--dissabled for now