gogits/gogs — pull request #701 by ErebusBat (2014-12-03 23:24:20+00:00)
Title: Fix #700 

Use the avatar.HashEmail function instead of hashing email directly. Fixes #700

- Used the existing `HashEmail` helper function (that wasn't being used otherwise)
- Changed the order of assignment so that `.AvatarEmail` is assigned before `.Avatar` so the call to generate the hash will always pass `AvatarEmail` rather than `Email` which is clearer in intent.
- Tested on an new user and edit profile