Influence of AGN on the properties of galaxies during the (U)LIRG phase