Support affiliation sync.

This commit is contained in:
Yang Luo
2021-06-04 23:00:54 +08:00
parent 081da18403
commit eb658ad8ee
7 changed files with 82 additions and 18 deletions

View File

@ -17,6 +17,7 @@ package object
import (
"fmt"
"reflect"
"strconv"
"strings"
"github.com/casdoor/casdoor/util"
@ -124,7 +125,7 @@ func ClearUserProperties(user *User, providerType string) bool {
}
func calculateHash(user *User) string {
s := strings.Join([]string{user.Id, user.Password, user.DisplayName, user.Avatar, user.Phone}, "|")
s := strings.Join([]string{user.Id, user.Password, user.DisplayName, user.Avatar, user.Phone, strconv.Itoa(user.Score)}, "|")
return util.GetMd5Hash(s)
}