Permalink
Browse files

Changes to not include deleted users in some things

  • Loading branch information...
1 parent bb09fb1 commit ae2e0dddad7e1892c89100e762d3c64aca519ff5 martin committed Sep 22, 2002
Showing with 5 additions and 3 deletions.
  1. +5 −3 mod/forum/lib.php
View
@@ -1005,7 +1005,7 @@ function forum_subscribed_users($course, $forum) {
}
return get_records_sql("SELECT u.* FROM user u, forum_subscriptions s
WHERE s.forum = '$forum->id'
- AND s.user = u.id");
+ AND s.user = u.id AND u.deleted <> '1'");
}
function forum_subscribe($userid, $forumid) {
@@ -1297,13 +1297,15 @@ function forum_print_recent_activity(&$logs, $isteacher=false) {
$post = get_record_sql("SELECT p.*, d.forum, u.firstname, u.lastname,
u.email, u.picture, u.id as userid
FROM forum_discussions d, forum_posts p, user u
- WHERE p.id = '$log->info' AND d.id = p.discussion AND p.user = u.id");
+ WHERE p.id = '$log->info' AND d.id = p.discussion
+ AND p.user = u.id and u.deleted <> '1'");
} else if ($log->action == "add discussion") {
$post = get_record_sql("SELECT p.*, d.forum, u.firstname, u.lastname,
u.email, u.picture, u.id as userid
FROM forum_discussions d, forum_posts p, user u
- WHERE d.id = '$log->info' AND d.firstpost = p.id AND p.user = u.id");
+ WHERE d.id = '$log->info' AND d.firstpost = p.id
+ AND p.user = u.id and u.deleted <> '1'");
}
if ($post) {

0 comments on commit ae2e0dd

Please sign in to comment.