gravatar
This commit is contained in:
parent
9cc20fe032
commit
9cb63171c1
|
@ -15,6 +15,8 @@
|
||||||
package session
|
package session
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"crypto/md5"
|
||||||
|
"encoding/hex"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
@ -118,9 +120,9 @@ func PreferenceHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
user.Password = args.Password
|
user.Password = args.Password
|
||||||
user.Email = args.Email
|
user.Email = args.Email
|
||||||
|
|
||||||
hash := md5.New()
|
hash := md5.New()
|
||||||
hash.Write([]byte(user.Email))
|
hash.Write([]byte(user.Email))
|
||||||
user.Gravatar := hex.EncodeToString(hash.Sum(nil))
|
user.Gravatar = hex.EncodeToString(hash.Sum(nil))
|
||||||
|
|
||||||
user.Locale = args.Locale
|
user.Locale = args.Locale
|
||||||
user.Theme = args.Theme
|
user.Theme = args.Theme
|
||||||
|
|
Loading…
Reference in New Issue