[X++] Find worker assigned to current user

To find the worker / employee of the current user in Dynamics AX 2012 you can use the currentWorker method of table DirPersonUser.
It returns the RecId of HcmWorker table.

HcmWorkerRecId workerRecId;
workerRecId = DirPersonUser::currentWorker();

Find out how to retrieve associated worker for a specific user here