Update get_unique_username to truncate username if too long.