A user id or an user-id?

The English language depends on how it sounds. Since "user" doesn't start with a vowel sound, it should be "a user-id."

"An" is sometimes used with words starting with 'h' where the 'h' is soft or silent, so the word almost starts with a vowel sound, but this usage is becoming less common with time. For example, "a historic event" sounded incorrect; "an historic event" was the right way to say it. There are other instances where "a" is correct. I think it is when the initial vowel sound of the noun is like a "diphthong", a vowel or vowel combination that changes value while it is being pronounced. So it sounds correct to say "a university" and "a euphemism".

It seems that "an" is used to solve the need to make a "stop" between vowel sounds, and it is jarring to my ear when people don't use "an" for this purpose. "Can you give a example" is awkward, because I want to make (and hear) a distinct "a" sound followed by a distinct "e" sound. Another example is "in the blink of a eye".

---

"User" does not begin with a vowel sound, but with a consonantal y-glide. That is why the n of an is dropped.