From eadb45e8912c3cd1d3af7cdf17a3641201213a34 Mon Sep 17 00:00:00 2001 From: zeripath Date: Sat, 11 Jan 2020 10:50:05 +0000 Subject: [PATCH] Restore IsPasswordSet previous value (#9682) --- models/user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/user.go b/models/user.go index f2c0a1861e5..9ddd262aed8 100644 --- a/models/user.go +++ b/models/user.go @@ -503,7 +503,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.