Download & Extend

Rules integration calls og_is_group_member() with wrong arguments.

Project:Organic groups
Version:6.x-2.x-dev
Component:og.module
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

It's probably outdated, i.e. at some point OG api changed but Rules integration wasn't updated to reflect the changes.
Now it's using og_is_group_member($node->nid, $user) but actual function should be called like og_is_group_member($gid, $include_admins = TRUE, $uid = NULL)

Comments

#1

Status:active» needs review

Attached patch fixes this bug. Also it adds checkbox for condition "user is member" so it's possible to control $include_admins variable.

AttachmentSizeStatusTest resultOperations
og-rules-ismember-fix.patch1.6 KBIgnored: Check issue status.NoneNone

#2

would be good to get a review/confirmation from a rules developer.

#3

Status:needs review» fixed

I have removed the !og_is_group_member($node->nid, FALSE, $user->uid)) check, as I don't think it's needed in the action. Other stuff are committed, thanks!

#4

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here