修正添加新数据后生成的FTP密码会有问题。

This commit is contained in:
wlx 2009-03-19 06:44:56 +00:00
parent af845190bd
commit 0f60dca50a
1 changed files with 6 additions and 6 deletions

View File

@ -68,6 +68,7 @@ class G6ftp
} }
} }
return implode("\n",$p); return implode("\n",$p);
//返回指定帐号的物理路径集合
} }
function createuser($user) function createuser($user)
{ {
@ -124,12 +125,11 @@ class G6ftp
$this->db->query($sql); $this->db->query($sql);
$sql="update ftpuser set ts_invalid=?,datacount=? where userid=?"; $sql="update ftpuser set ts_invalid=?,datacount=? where userid=?";
$this->db->query($sql,array($user->time,$user->datacount+1,$user->id)); $this->db->query($sql,array($user->time,$user->datacount+1,$user->id));
} else {
$sql="select pwd,ts_invalid from ftpuser where userid=?";
$u=$this->db->fetchRow($sql,array($user->id));
$this->pwd=$u['pwd'];
$this->time=$u['ts_invalid'];
} }
$sql="select pwd,ts_invalid from ftpuser where userid=?";
$u=$this->db->fetchRow($sql,array($user->id));
$this->pwd=$u['pwd'];
$this->time=$u['ts_invalid'];
return true; return true;
} else //同时下载数据数超过限制 } else //同时下载数据数超过限制
return false; return false;