mirror of https://github.com/BOINC/boinc.git
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)
This commit is contained in:
parent
e6e573da2d
commit
80efeb28fe
|
@ -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("
|
||||
|
|
Loading…
Reference in New Issue