As this method is only used in creating a template, and as `doSetlogin` is called before that, there is no chance that the template and the owner could have the same login.

Be sure you have a unit test covering this case and remove this check