summaryrefslogtreecommitdiffstats
path: root/models/issue_watch.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/issue_watch.go')
-rw-r--r--models/issue_watch.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/models/issue_watch.go b/models/issue_watch.go
index 37511787e5..994ae5a97f 100644
--- a/models/issue_watch.go
+++ b/models/issue_watch.go
@@ -90,7 +90,10 @@ func GetIssueWatchers(issueID int64) ([]*IssueWatch, error) {
func getIssueWatchers(e Engine, issueID int64) (watches []*IssueWatch, err error) {
err = e.
- Where("issue_id = ?", issueID).
+ Where("`issue_watch`.issue_id = ?", issueID).
+ And("`user`.is_active = ?", true).
+ And("`user`.prohibit_login = ?", false).
+ Join("INNER", "user", "`user`.id = `issue_watch`.user_id").
Find(&watches)
return
}