fix #432, force to update g6 password

This commit is contained in:
wlx 2012-12-04 16:40:56 +00:00
parent 347485a6c7
commit 6384c029cb
1 changed files with 4 additions and 4 deletions

View File

@ -123,15 +123,15 @@ class G6ftp
if ($this->getuserpath1($user->path)) {
$sql=$this->db->quoteInto("update g6ftpusersettings set configvalue=configvalue||'\n'||? where configname='AccessList' and userid=".$userid,$this->getuserpath1($user->path));
$this->db->query($sql);
}
//确保密码要同步更新因为Proftp类中也会更新此密码数据
$sql=$this->db->quoteInto("update g6ftpusersettings set configvalue=? where configname='Password' and userid=".$userid,strtoupper('MD5:'.md5($user->password)));
$this->db->query($sql);
$sql="update ftpuser set pwd=?,ts_invalid=?,datacount=? where userid=?";
$this->db->query($sql,array($user->password,$user->time,$user->datacount+1,$user->id));
}
$sql="select pwd,ts_invalid from ftpuser where userid=?";
$u=$this->db->fetchRow($sql,array($user->id));
//$this->pwd=$u['pwd'];
$this->pwd=$u['pwd'];
$this->time=$u['ts_invalid'];
return true;
} else //同时下载数据数超过限制