fix changing password when using sqlite

This commit is contained in:
Robin Appelman 2010-06-11 00:40:42 +02:00
parent b9f7a4d955
commit 3c19e66151
2 changed files with 2 additions and 1 deletions

View file

@ -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;

View file

@ -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