hsun 2 years ago
parent
commit
4c7eecedee
1 changed files with 6 additions and 0 deletions
  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
 		return
 	}
 	}
+	if adminInfo.Enabled != 1 {
+		return
+	}
 	ok = true
 	ok = true
 
 
 	return
 	return
@@ -461,6 +464,9 @@ func GetResearcherByUserInfo(userInfo UserInfo) (ok bool, adminInfo *admin2.Admi
 		}
 		}
 		return
 		return
 	}
 	}
+	if adminInfo.Enabled != 1 {
+		return
+	}
 	researchGroupList, e := research_group_relation.GetResearchGroupRelationByAdminId(int(adminInfo.AdminID))
 	researchGroupList, e := research_group_relation.GetResearchGroupRelationByAdminId(int(adminInfo.AdminID))
 	if e != nil {
 	if e != nil {
 		err = e
 		err = e