From 6384c029cb0f56d087845f92a69a30904bc81566 Mon Sep 17 00:00:00 2001 From: wlx Date: Tue, 4 Dec 2012 16:40:56 +0000 Subject: [PATCH] fix #432, force to update g6 password --- application/models/G6ftp.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/application/models/G6ftp.php b/application/models/G6ftp.php index b74a3cf9..e0711a2c 100644 --- a/application/models/G6ftp.php +++ b/application/models/G6ftp.php @@ -123,19 +123,19 @@ 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)); - } + $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 //同时下载数据数超过限制 return false; } } -?> \ No newline at end of file +?>