It is permissible to praise someone in their presence and in their absence. However, in the situation where one is praising a person in his presence, he should not excessively praise him as that may be a means of him becoming vain and proud.
It is narrated on the authority of Miqdaad ibn al-Aswad that Rasulullah [sallallaahu alayhi wasallam] said, ‘When you are faced with those people who praise you excessively, then throw sand onto their faces.’ This Hadith refers to those who excessively praise a person or those who praise in order to gain something.