On this issue, we would like to cite the respond of Dr. Rajab AbuMaleeh, a sharia consultant, who said that;
‘Islam teaches and obliges Muslims to be honest and truthful, so the Prophet (peace and blessings be upon him) is reported to have said, “Stick to truthfulness, for it leads one to righteousness, and the latter leads to Paradise. Thus, when one sticks to truthfulness and shows keenness in it, Allah considers him as an absolutely truthful man. And avoid telling lies, for it leads to excessiveness, and this leads to Hellfire. Thus, when one persists in telling lies, Allah considers him as a liar” (Al-Bukhari).
Thus, it is not permissible to tell lies for the fear of pride, since the matter is built upon good intention. So, if you fast for example for the sake of Allah, there is no problem if others know that as long as you are sincere in your fasting.
however, if you fear that you may be proud of their knowing that, you may hide and use insinuation, but do not tell explicit lying.’