Fired for repeating racist slur, school guard will get job back, union says