As a note, Eemshoorn.. It's unlikely that a friend whose game someone is using uninstalls it and doesn't use it for the duration of the time that the other one is also using it.
And you can't register a key twice anyway.
So if they are both using the game at the same time, than this is just not allowed, easy as that.
If his friend has uninstalled and unregistered the game for the duration, then that's okay. Experience teaches us though, that this rarely is the case, or that the 'it's my friend's game' is often not a fact but an excuse. Which I won't claim in this case, that's going too far.. but just FYI.
Regards,
Fred