Hi and welcome to the Migraines & Headaches Community.
Yes, I have short term memory really bad. My doctor told me it was stress related....which, migraines are too so, yeah it is safe to say that migraines can affect your memory. And I have noticed that my memory gets worse if the migraines get worse and get better if migraines are easing up.
So....if you forget someone's name....yep, blame it on the migraines/stress....lol
I've been having constant headaches and I have the same problem I'll say things wrong or something totally wrong I'll forget stuff but it's also because I have really bad anxiety.. Do you??