Why $f=g$ or $f=\bar{g}$? 
Let $R$ be a ring with identity and $\mathbb{C}$ the ring of complex numbers. Suppose $f,g:R\rightarrow \mathbb{C}$ are two ring homomorphisms such that for every $r$ in $R$, $|f(r)|=|g(r)|$. Prove that $f=g$ or $f=\bar{g}$.

I prove some results but they do not help:
For example, In the above question, if $f,g:R\rightarrow \mathbb{R}$, they are equal,
or, in general, if $f:\mathbb{Z} \rightarrow \mathbb{C}$, then $f=id$.
 A: Since $|f| = |g|$, $\ker f = \ker g$, so by factoring out the kernel we reduce to the case that $f$ and $g$ are injections. Since im $f$, im $g \subseteq \mathbb{C}$ are then subrings both isomorphic to $R$, the problem can be reinterpreted as follows: If $S$ and $T$ are subrings of $\mathbb{C}$ such that there exists an isomorphism $\sigma: S \to T$ with $|\sigma(z)| = |z|$ for all $z \in S$, then $\sigma = 1$ or complex conjugation. 
Expanding $|z+1|^2 = |\sigma(z+1)|^2 = |\sigma(z) + 1|^2$ using the inner product of $\mathbb{C}$, we find Re $\sigma(z)$ = Re $z$. Since $|\sigma(z)| = |z|$, for all $z \in S$ we have $\sigma(z) = z$ or $\overline{z}$.
Suppose $\sigma(w) \ne w$ for some fixed $w$. Then for any $z \in S$, there are two cases: $z + w = \sigma(z + w)$ or $\overline{z} + \overline{w} = \sigma(z + w)$. In the former case, we find $0 \ne z - \sigma(z) = w - \overline{w}$, forcing $\sigma(z) = \overline{z}$; in the latter case, we find $\sigma(z) = \overline{z}$ directly. So if $w$ exists, $\sigma$ is complex conjugation; otherwise $\sigma = 1$.
