When someone praises you, you must feel dislike for his praises within your heart. If he has praised you for something you truly possess say: 'Praise belongs to God Who has revealed the good things and concealed the ugly ones.' And if he praises you for something which you do not possess, say as one of our predecessors said: 'O God! Do not call me to account for what they say, forgive me what they do not know, and make me better than they think.'
In your case do not praise anyone unless you know that your praises will incite him to more good works or unless he is a superior man whose superiority is not well known and you wish to make it so, this being on condition that you are safe from lying and he is safe from conceit. [Al-Haddad, The Book of Assistance]