Both are correct, but #1 sounds old-fashioned and uncommon. Most native speakers would say 'were' instead of 'had been'. The word 'before' makes the sequence of events clear wittout using Past Perfect tense..
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.