diff --git a/models/org.go b/models/org.go index d79c0db84ec..9caa98967f8 100644 --- a/models/org.go +++ b/models/org.go @@ -752,11 +752,10 @@ func (org *User) accessibleReposEnv(e Engine, userID int64) (AccessibleReposEnvi var user *User if userID > 0 { - u, err := getUserByID(e, userID) + user, err := getUserByID(e, userID) if err != nil { return nil, err } - user = u } teamIDs, err := org.getUserTeamIDs(e, userID)