#961122: fixes "Missing template users/destroy" error.

 Since user.destroy may fail (if any of the callbacks fail, for example), we need to handle this case as well.
 Fixed similar issues in environment and repositories controllers.
Merge pull request #2324 from witlessbird/961122

 #961122: fixes "Missing template users/destroy" error.