Modify get username function