This commit is contained in:
Liang Ding 2014-12-14 10:36:25 +08:00
parent 5bc4dfd088
commit 595207279f
1 changed files with 5 additions and 0 deletions

View File

@ -117,6 +117,11 @@ func PreferenceHandler(w http.ResponseWriter, r *http.Request) {
user.Workspace = args.Workspace user.Workspace = args.Workspace
user.Password = args.Password user.Password = args.Password
user.Email = args.Email user.Email = args.Email
hash := md5.New()
hash.Write([]byte(user.Email))
user.Gravatar := hex.EncodeToString(hash.Sum(nil))
user.Locale = args.Locale user.Locale = args.Locale
user.Theme = args.Theme user.Theme = args.Theme
user.Editor.FontFamily = args.EditorFontFamily user.Editor.FontFamily = args.EditorFontFamily