limit login-name in accesslog to 30 chars as the column is created in table

This commit is contained in:
Ralf Becker 2004-03-28 14:58:45 +00:00
parent 2deefe45f7
commit 3ca724bf61

View File

@ -608,6 +608,10 @@
if ($login != '')
{
if (strlen($login) > 30)
{
$login = substr($login,0,30);
}
$GLOBALS['phpgw']->db->query('INSERT INTO phpgw_access_log(sessionid,loginid,ip,li,lo,account_id)'
. " VALUES ('" . $sessionid . "','" . $this->db->db_addslashes($login). "','"
. $this->db->db_addslashes($user_ip) . "',$now,0," . (int)$account_id .')',__LINE__,__FILE__);