mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-04 09:44:21 +00:00 
			
		
		
		
	bug fixed for 500 caused by get org users (#149)
This commit is contained in:
		@@ -323,8 +323,8 @@ func GetOwnedOrgsByUserIDDesc(userID int64, desc string) ([]*User, error) {
 | 
				
			|||||||
func GetOrgUsersByUserID(uid int64, all bool) ([]*OrgUser, error) {
 | 
					func GetOrgUsersByUserID(uid int64, all bool) ([]*OrgUser, error) {
 | 
				
			||||||
	ous := make([]*OrgUser, 0, 10)
 | 
						ous := make([]*OrgUser, 0, 10)
 | 
				
			||||||
	sess := x.
 | 
						sess := x.
 | 
				
			||||||
		Join("LEFT", "user", `"org_user".org_id="user".id`).
 | 
							Join("LEFT", "user", "`org_user`.org_id=`user`.id").
 | 
				
			||||||
		Where(`"org_user".uid=?`, uid)
 | 
							Where("`org_user`.uid=?", uid)
 | 
				
			||||||
	if !all {
 | 
						if !all {
 | 
				
			||||||
		// Only show public organizations
 | 
							// Only show public organizations
 | 
				
			||||||
		sess.And("is_public=?", true)
 | 
							sess.And("is_public=?", true)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user