| Parsed-tickets: Use fullname from user (if user exists in database) -
03-10-2006, 07:56 AM
This is my hack to retrieve the fullname from the user in the database, instead of using the fromname form the emailheaders when creating tickets (or ticketpost) from the parser. If the user doesn't exists, then it uses the emailheader-fromname. File: /modules/parser/funtions_parsercore.php Find around line 477 (v3.00.90) or line 483 (v3.04.00): // Create the Ticket Post Add right before this: // Find fullname form userid
$_fullname = $dbCore->queryFetch("SELECT * FROM `". TABLE_PREFIX ."users` WHERE `userid` = '". intval($userid) ."';");
if (!empty($_fullname["fullname"]))
{
$_email["fromName"] = $_fullname["fullname"] ;
} Find around line 571 (v3.00.90) or line 578 (v3.04.00): $_ticketiddata = createTicket(POST_CLIENT....... Add right before this: // Find fullname form userid
$_fullname = $dbCore->queryFetch("SELECT * FROM `". TABLE_PREFIX ."users` WHERE `userid` = '". intval($userid) ."';");
if (!empty($_fullname["fullname"]))
{
$_email["fromName"] = $_fullname["fullname"] ;
} |