Is user a or an? A user is correct. “User” starts with the consonant sound “y”, not with a vowel sound, even though it is spelled with a vowel as the first letter.
Is it an or a before user? So we see that it starts with [j] which is generally considered to be a consonant sound. Therefore we should say and write a user and not “an user” since we use “a” before a word which begins with a consonantal sound.
Why do we say a user? The choice of a or an is made based on pronunciation, not spelling. The only reason the word an exists is because a followed by another vowel is awkward to pronounce. Since user is pronounced /ˈjuːzə/, starting with a consonant “y” sound, the article a is appropriate, and an is not.
When to use a or an examples? (The words “an” and “a” are known as articles.) The sound of a word’s first letter determines whether to use “an” or “a.” If the word starts with a vowel sound, you should use “an.” If it starts with a consonant sound, you should use “a.” For example: Buy a house in an hour.