Hello, well everything is possible.
The easiest way to do it is to change if statement in login.php
replace
if($_POST && (!empty($_POST) && !empty($_POST))):
with
if($_POST && !empty($_POST))):
but just in case you can make a select and get user's email for the further needs and reassign it to $_POST.
So in general it'll be something like this:
if(($_POST && !empty($_POST))):
$loginmsg='Authentication Required';
$ticketID=trim($_POST);
$sql='SELECT email FROM '.TICKET_TABLE.' WHERE TicketID='.db_input($ticketID).' Limit 1';
$res=db_query($sql);
$row=db_fetch_array($res);
$_POST=trim($row);
$email=trim($_POST);
Hope it helps