Add user soft deletion.

This commit is contained in:
Gucheng Wang
2021-11-06 15:52:03 +08:00
parent db892333fe
commit 9e920181d2
11 changed files with 72 additions and 19 deletions

View File

@ -102,7 +102,7 @@ func CheckPassword(user *User, password string) string {
func CheckUserPassword(organization string, username string, password string) (*User, string) {
user := GetUserByFields(organization, username)
if user == nil {
if user == nil || user.IsDeleted == true {
return nil, "the user does not exist, please sign up first"
}