Yahya bin Ayyub said: He (Sayyiduna Ubayy bin Imarah, may Allah be pleased with him) had prayed with the Prophet (peace and blessings be upon him) towards both qiblahs.