apl_session: Add apl_getcurrentuser function