Custom function - to fetch loginuser ID -

Custom function - to fetch loginuser ID -

Use case : I want to auto convert an 'accepted' Estimate with two conditions into 'Invoice' and send it automatically to the buyer.
The function is given below and working fine.
But if some user generates an estimate' with the two conditions, it is executing but it is showing as submitted 'by me' and approved 'byme' i.e. arvind though I did not generate that estimate.
Can some one help me in revising the function given below to fulfill by task.

My requirement:: When any user generates with the two conditions, I want to have the submitter's name and approvers name and not mine.
____________________________________________________________________________________________________________