Closed (fixed)
Project:
User Image Approval
Version:
7.x-1.5
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
16 Oct 2017 at 23:01 UTC
Updated:
29 Dec 2017 at 18:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
redeight commentedHere's a patch that should add what I need. I wasn't able to get the user account to push through right now, but I'm sure someone can figure that out.
Comment #3
redeight commentedtypo in initial patch.
Comment #4
prethiee commentedThanks for the request RedEight, I totally agree on integrating rules with the module. It definitely gives a leg up on the overall functionality of the module. Meanwhile, I was testing to pull through the user obj into the actions section and was able to get them show in GUI.You can switch it between either current_user or user for variables under the rules_event_info. I have included the patch, hope it can help you in any way with what you're trying to achieve.
Comment #5
redeight commentedThe only note I would make is that there is no check to ensure rules is installed. Unless you wanted to implement some of this modules features in Rules, I don't think this module needs to set rules as a dependent. We should just add an
if (module_exists('rules'))around any call torules_invoke_event. That'll prevent a confusing white-screen for the few Drupal sites that don't use Rules.Comment #6
redeight commentedLike this
Comment #7
redeight commentedI think two other areas could benefit from an event.
Image Approved: with variables for the image, submitting user, and approving moderator.
Image Denied: with variables for the image, submitting user, and denying moderator.
Comment #8
prethiee commentedagreed, the good old white-screen, we have all been there.
Comment #9
prethiee commentedAlong with the event that is already in place, I have added a patch covering the two more scenarios you suggested and definitely see their potential to be added in the upcoming release.
Comment #11
prethiee commentedThe current release has the rules integrated. Re-open this thread to suggest new use-cases.