mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 12:30:19 +08:00
Add willLog() and control access to signup page.
This commit is contained in:
@ -86,15 +86,6 @@ func GetUser(id string) *User {
|
||||
return getUser(owner, name)
|
||||
}
|
||||
|
||||
func HasUser(id string) bool {
|
||||
return GetUser(id) != nil
|
||||
}
|
||||
|
||||
func IsPasswordCorrect(userId string, password string) bool {
|
||||
user := GetUser(userId)
|
||||
return user.Password == password
|
||||
}
|
||||
|
||||
func UpdateUser(id string, user *User) bool {
|
||||
owner, name := util.GetOwnerAndNameFromId(id)
|
||||
if getUser(owner, name) == nil {
|
||||
@ -224,10 +215,6 @@ func GetUserField(user *User, field string) string {
|
||||
|
||||
func GetMaskedUser(user *User) *User {
|
||||
user.Password = "***"
|
||||
user.Github = "***"
|
||||
user.Google = "***"
|
||||
user.QQ = "***"
|
||||
user.WeChat = "***"
|
||||
return user
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user