It was narrated that Ibn Abbas said:
"The Messenger of Allah cursed women who visit graves, and those who take them as Masjid and put lamps on them."