Extracting function get_user_name.