fix: validate parameter and nil in func updateUser (#1714)

* fix: validate parameter and nil in func updateUser

* fix: delete blank line
This commit is contained in:
Yaodong Yu
2023-04-09 10:35:30 +08:00
committed by GitHub
parent 3d5a645a3b
commit b7d78d1e27
4 changed files with 36 additions and 13 deletions

View File

@ -342,7 +342,7 @@ func CheckUsername(username string, lang string) string {
return ""
}
func CheckUpdateUser(oldUser *User, user *User, lang string) string {
func CheckUpdateUser(oldUser, user *User, lang string) string {
if user.DisplayName == "" {
return i18n.Translate(lang, "user:Display name cannot be empty")
}