I think your Korean friend was wrong. It is not the same thing at all.
It means -하는 한. - 한다면.
As long as you're here, I'm fine = 너가 여기 있는 한, 난 괜찮아.
-하기만 하면 means "if you dare"
for example,
"if you dare breathe a word, I will cut your head off"
= 말한마디하기만 하면, 죽여버리겠다.