Prevent templates from being destroyed

Check if is template before removing an inactive user
Merge branch 'template_destroyed' into 'stable'

Prevent templates from being destroyed

Check if is template before removing an inactive user

See merge request !391