All perfect praise be to Allaah, The Lord of the worlds. I testify that there is none worthy of worship except Allaah and that Muhammad is His slave and Messenger.
What you quoted in the question is true, and they are the words of Shaykh Ibn Taymiyyah in Al-Hamawiyyah. The hadeeth that he mentioned is authentic, and it was reported by Al-Bukhari and Muslim that Ibn ‘Umar narrated that when the Prophet saw a spit on the wall of the Qiblah, he rubbed it off and then turned to the people and said, “When one of you is praying, he should not spit in front of him as Allaah is in front of him when he prays.”
As regards what people say about Shaykh Ibn Taymiyyah, then the answer is that the Shaykh did not intend to compare Allaah to His Creation because in so many of his fataawa and in many of his books he denied tashbeeh (drawing a resemblance between Allaah and His Creation).
For instance, he said in Majmoo' Al-Fataawa (5/195):
“It is not permissible to deny the Attributes of Allaah by which He described Himself; and it is not permissible to compare them to the attributes of the creatures; rather, Exalted and Glorified be He, {There is nothing like unto Him, and He is the All-Hearer, the All-Seer}. There is nothing like unto Him, neither in His Essence nor in His Attributes nor in His Actions. Nu'aym ibn Hammaad Al-Khuzaa'i said, 'Whoever likens Allaah to His creation, then he has indeed disbelieved, and whoever denies the Attributes by which Allaah described Himself, he has indeed disbelieved, and there is no likeness to what Allaah described Himself with or what the Prophet described Him with. The doctrine of the Salaf (righteous predecessors) comes between two doctrines [i.e. it is moderate], and it is a guidance between two misguided doctrines: Affirming the Attributes and denying their resemblance with the creatures. The saying of Allaah: {There is nothing like unto Him} is a response to the people who draw resemblances between Him and His creation; and the saying of Allaah {and He is the All-Hearer, the All-Seer} is a response to the people who deny the Attributes of Allaah and negate them (Ta'teel)...'”
Shaykh Ibn Taymiyyah profoundly elaborated in refuting the view of the Mushabbihah (those who compare Allaah to His creation) and strongly refuted their view in many of his works, contrary to what the ignorant people attribute to him. Indeed, the leading scholars and knowledgeable people declared him innocent of this horrid accusation. For example, you may refer to what Mullah Ali Qaari said in Mirqaat Al-Mafaateeh (8/148) about Shaykh Ibn Taymiyyah and Ibn Al-Qayyim; that Allaah protected them from this heinous accusation and horrible trait; that they were among the Ahlus-Sunah wal Jamaa’ah; and that they were, rather, from the awliyaa' (pious men) of this nation. This was in the context of his answer to Ibn Hajar Al-Haytami all.
As regards what he meant with his statement, then it is to explain to the people that there is no contradiction between Allaah's Attribute of 'Uluww (the fact that He is High and Above His creation) and the fact that He is in front of the praying person.
Shaykh Ibn ‘Uthaymeen said:
“Evidence that Allaah is in front of the praying person:
- The saying of the Prophet : 'If one of you stands in prayer, he should not spit in front of him as Allaah is in front of him.'
Allaah being in front of the praying person is something that is affirmed to Allaah in a manner that suits His Majesty, and it does not contradict the fact that He is High and Above. Reconciling between the two meanings is as follows:
1. Allaah being in front of the praying person is possible in regard to the creature, as if when the sun is rising, it is in front of the person who is facing the East, whereas the sun is high in the sky; so since these two attributes can be combined in a creature (the sun), then it is more appropriate that they can be combined in the Creator Himself.
2. If it is impossible that these two attributes can be combined in the creature, then there is nothing that makes it impossible for them to be combined in the Creator because there is nothing like unto Him.”
Allaah knows best.