As per Vaishnavism, Lord Ganesha is considered as an avatar of lord Vishvaksena. It is believed, that in the divine abode of Lord Vishnu, the vaikuntha, Vishvaksena is one of the dwarapalakas (Guards) of Narayana. The dwarapalakas contains the features of Lord Vishnu himself, and hence, the first god Ganesha can also be believed to be an avatar of Vishnu. There would be a separate shrine for Lord Vishvaksena in some of the Vishnu Temples, and in those temples, he is worshipped similar to Lord Vinayaka, and first respects would be given to him only.
In the shrines of Lord Vinayaka, present in the Vishnu Temples, his deity would be applied with Thiruman (NAMAM) on his forehead, and thus he is worshipped as “THUMBIKKAI ALWAR”, in Vishnu Temples. As per the holy SrimadBhagavatham, Lord Vishnu is considered as the supreme deity, and all other deities, including the first god Vinayaka, are considered only as demi gods. There is also a special personal bondage between Vishnu and Vinayaka, since Lord Vishnu is considered to be the brother of Ma Shakti Devi, the divine mother of Lord Vinayaka.
Before a century ago, most of the ancient Vaishnavites would worship only Lord Vishnu, and they would worship all other deities only in a half-heartedly manner, since they consider Lord Vishnu as the superior among all other gods. But nowadays things are tremendously changed, and even some of the Vaishnavites are applying the sacred ash (Vibhooti) on their forehead instead of their holy mark, Thiruman, since most of the present day Vaishnavites strongly believe that both Lord Vishnu and Shiva are one and the same.
By Worshipping Lord Vinayaka in the temples of Vishnu, we could get the blessings of both Lord Vishnu and Vinayaka, and instead of doing research work on finding out who is the supreme deity, let us consider all the deities are one and the same, and they contain equivalent powers on their own, and let us be blessed.