What a load of horseshit. I have smoked nearly every day for 15 years, and in that time I've had a cold about 4 times. All within the last 3 years, I went a solid decade without a single damn illness outside of food poisoning once.
Whoever told you marijuana compromises your immune system was probably a pharma whore.