I assume we use different wordings, so the misunderstanding. For me a "user" is someone who just submits a ticket and waits for an answer or a solution to a problem. The guy (or girl) who is actually solving the problem is from "staff". Seems you use the term "user" where i use "staff".
Regardless, what you probably want is a modification, that the information about the "closing staff person" is not lost when the ticket is actually closed.
To do that, open /include/class.ticket.php and search for the "function close" (should be around line 420). There you see an sql-statement that contains
... SET status='.db_input('closed').',staff_id=0,isoverdue=0,duedate=NULL,updated=NOW(), ...
Change that to
... SET status='.db_input('closed').',isoverdue=0,duedate=NULL,updated=NOW(), ...
so the staff_id of the last person, that worked on and closed it, doesn't get deleted.
Best
T.