File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -381,12 +381,12 @@ func (u *User) SetPassword(passwd string) (err error) {
381381
382382// ValidatePassword checks if the given password matches the one belonging to the user.
383383func (u * User ) ValidatePassword (passwd string ) bool {
384- return u . IsPasswordSet () && hash .Parse (u .PasswdHashAlgo ).VerifyPassword (passwd , u .Passwd , u .Salt )
384+ return hash .Parse (u .PasswdHashAlgo ).VerifyPassword (passwd , u .Passwd , u .Salt )
385385}
386386
387- // IsPasswordSet checks if the user allows to use password and the password is set
387+ // IsPasswordSet checks if the password is set or left empty
388388func (u * User ) IsPasswordSet () bool {
389- return u .IsIndividual () && u . Passwd != ""
389+ return u .Passwd != ""
390390}
391391
392392// IsOrganization returns true if user is actually an organization.
You can’t perform that action at this time.
0 commit comments