fix #432, force to update g6 password
This commit is contained in:
parent
347485a6c7
commit
6384c029cb
|
@ -123,19 +123,19 @@ class G6ftp
|
||||||
if ($this->getuserpath1($user->path)) {
|
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));
|
$sql=$this->db->quoteInto("update g6ftpusersettings set configvalue=configvalue||'\n'||? where configname='AccessList' and userid=".$userid,$this->getuserpath1($user->path));
|
||||||
$this->db->query($sql);
|
$this->db->query($sql);
|
||||||
|
}
|
||||||
//确保密码要同步更新,因为Proftp类中也会更新此密码数据
|
//确保密码要同步更新,因为Proftp类中也会更新此密码数据
|
||||||
$sql=$this->db->quoteInto("update g6ftpusersettings set configvalue=? where configname='Password' and userid=".$userid,strtoupper('MD5:'.md5($user->password)));
|
$sql=$this->db->quoteInto("update g6ftpusersettings set configvalue=? where configname='Password' and userid=".$userid,strtoupper('MD5:'.md5($user->password)));
|
||||||
$this->db->query($sql);
|
$this->db->query($sql);
|
||||||
$sql="update ftpuser set pwd=?,ts_invalid=?,datacount=? where userid=?";
|
$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=?";
|
$sql="select pwd,ts_invalid from ftpuser where userid=?";
|
||||||
$u=$this->db->fetchRow($sql,array($user->id));
|
$u=$this->db->fetchRow($sql,array($user->id));
|
||||||
//$this->pwd=$u['pwd'];
|
$this->pwd=$u['pwd'];
|
||||||
$this->time=$u['ts_invalid'];
|
$this->time=$u['ts_invalid'];
|
||||||
return true;
|
return true;
|
||||||
} else //同时下载数据数超过限制
|
} else //同时下载数据数超过限制
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue