diff --git a/models/user.go b/models/user.go index 5efa31cf8..1a466313c 100644 --- a/models/user.go +++ b/models/user.go @@ -502,7 +502,7 @@ func (u *User) ValidatePassword(passwd string) bool { // IsPasswordSet checks if the password is set or left empty func (u *User) IsPasswordSet() bool { - return len(u.Passwd) > 0 + return !u.ValidatePassword("") } // UploadAvatar saves custom avatar for user.