summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-01-11 10:50:05 +0000
committerLunny Xiao <xiaolunwen@gmail.com>2020-01-11 18:50:05 +0800
commiteadb45e8912c3cd1d3af7cdf17a3641201213a34 (patch)
treebd0450171b1c08e68aa58b987d82ddabc788e76f /models
parent32fb813133c74ddc3af1964e81fff72fea4f24f1 (diff)
downloadgitea-eadb45e8912c3cd1d3af7cdf17a3641201213a34.tar.gz
gitea-eadb45e8912c3cd1d3af7cdf17a3641201213a34.zip
Restore IsPasswordSet previous value (#9682)
Diffstat (limited to 'models')
-rw-r--r--models/user.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/user.go b/models/user.go
index f2c0a1861e..9ddd262aed 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.