Functional equation $f(f(x)y+x)=f(x)f(y)+f(x)$ Find all functions $ f:\mathbb{Z} \to \mathbb{Z}$ such that for all $x, y \in \mathbb{Z}$:
i) if $x \ne y$ then $f(x) \ne f(y)$;
ii) $f(f(x)y+x)=f(x)f(y)+f(x)$.
My work. 
It is easy to see that a function $f(x)=kx$, where $k=const$ ( $k \in \mathbb{Z}\backslash \{0\}$ ), is a solution of the problem. But is this the only solution? It is easy to see that $f(0)=0$.
 A: A paraphrase of the solution by pco at AoPS:


*

*By setting $x=y=0$ we get that $f(0)=0$. Since $f$ is injective, we have $f(x)\neq 0$ for all $x\neq 0$. In particular, $a:=f(1)\neq 0$.

*By setting $x=1$, we get for all $y$: $$f(ay+1)=a(f(y)+1)$$

*In particular, $$f(a+1)=a(a+1)$$

*By setting $x=a\tilde x+1$ and $y=1$ we get for all $\tilde x\in\mathbb Z$: $$f\big(f(a\tilde x+1)+a\tilde x+1\big)\overset{2.}=f\big(a(f(\tilde x)+1)+a\tilde x+1\big)=a(f(\tilde x)+1)(a+1).$$

*By setting $x=a+1$ and $y=\tilde x$ we get for all $\tilde x$:
$$f\big(f(a+1)\tilde x+a+1\big)\overset{3.}=f\big(a(a+1)\tilde x+a+1\big)=f(a+1) f(\tilde x)+f(a+1)\overset{3.}=a(f(\tilde x)+1)(a+1).$$
It follows that for all $\tilde x\in\mathbb Z$, $$f\big(a(a+1)\tilde x+a+1\big)=f\big(a(f(\tilde x)+1)+a\tilde x+1\big)$$
and thus since $f$ is injective $$a(a+1)\tilde x+a+1=a(f(\tilde x)+1)+a\tilde x+1$$
or $$a^2\tilde x+a=a f(\tilde x)+a$$
which implies that the only solutions are of the form $$f(\tilde x)=a\tilde x.$$
