Solution by benjaminchew13.
Let P(x,y) denote f(xf(x)+xf(y))=x2+xf(y).
P(0,0):f(0)=0.
P(x,0):f(xf(x))=x2.
f(u)=0⟹u=0, so f(x)=0⟺x=0.
P(−f(y),y):f(−f(y))=−f(y) for all y=0.
For all x=0, we have P(x,−f(x)):f(x)=x.
P(1,y):f(f(y)+f(1))=f(y)+1.
P(x,−f(x)):x2=xf(x) so f(x)=x for all x=0.
Since f(0)=0, so we have f(x)≡x, which is a solution.