From 80efeb28fe9aa072339fd1808374da55f07a4c2a Mon Sep 17 00:00:00 2001 From: Tristan Olive Date: Tue, 18 Feb 2014 02:23:33 -0500 Subject: [PATCH] Team forum insert hook Fixed hook to add entry to mapping table on team_forum node insert. The UID must be from the node, not the current user, in case the node is being created by a third party (i.e. during import) (DBOINCP-59) --- .../default/boinc/modules/boincteam/boincteam_forum.module | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drupal/sites/default/boinc/modules/boincteam/boincteam_forum.module b/drupal/sites/default/boinc/modules/boincteam/boincteam_forum.module index 220306cfea..1d0a8e101f 100644 --- a/drupal/sites/default/boinc/modules/boincteam/boincteam_forum.module +++ b/drupal/sites/default/boinc/modules/boincteam/boincteam_forum.module @@ -86,8 +86,7 @@ function boincteam_forum_nodeapi(&$node, $op, $a3 = null, $a4 = null) { function boincteam_forum_node_insert($node) { switch($node->type) { case 'team_forum': - global $user; - $account = user_load($user->uid); + $account = user_load($node->uid); $team_id = boincteam_forum_lookup_nid($node->tfid); if ($account->team == $team_id) { db_query("