hsun 2 anni fa
parent
commit
4c7eecedee
1 ha cambiato i file con 6 aggiunte e 0 eliminazioni
  1. 6 0
      services/user/user.go

+ 6 - 0
services/user/user.go

@@ -438,6 +438,9 @@ func GetAdminByUserInfo(userInfo UserInfo) (ok bool, adminInfo *admin2.Admin, er
 		}
 		return
 	}
+	if adminInfo.Enabled != 1 {
+		return
+	}
 	ok = true
 
 	return
@@ -461,6 +464,9 @@ func GetResearcherByUserInfo(userInfo UserInfo) (ok bool, adminInfo *admin2.Admi
 		}
 		return
 	}
+	if adminInfo.Enabled != 1 {
+		return
+	}
 	researchGroupList, e := research_group_relation.GetResearchGroupRelationByAdminId(int(adminInfo.AdminID))
 	if e != nil {
 		err = e