Use Case
-------------
Create a ruleset that performs the following actions via VBO on a specfic node

Action 1: Unpublish content
Action 2: Send email to author of the content saying "your data is unpublished for the following reasons"
Action 3: Block the user

In the current implementation Action 2 can only be performed as follows

1. Select action "load a user" , provide token [node:uid]
2. Select action "Send message"

At this point you will see that argument fields for both "recipient" and "sender" will have the same "loaded_user"

Currently available work around
-------------------------------------
The current available work around is to perform action "load a user" the second time, and second time provide a specific "uid" and then in step 2, select author , explicity loaded user for recipient and sender.

Desirable solution
----------------------
Desirable solution for this would be to be able to load "currently logged in user" in a action, so that when messages are sent out they go out from "currently logged in user" .. who in my case would be the user that is performing Views Bulk Operations.

CommentFileSizeAuthor
#2 rules-933528.patch1.44 KBRavi.J
#1 rules-933528_1.patch1.44 KBRavi.J

Comments

Ravi.J’s picture

Component: Rules Core » Rules Engine
Issue tags: +Action to load currently logged in user
StatusFileSize
new1.44 KB

Attached Patch that provides "Load currently logged in user" action

Ravi.J’s picture

Status: Active » Needs review
StatusFileSize
new1.44 KB

Patch had wrong naming convention, attached again

klausi’s picture

Status: Needs review » Active

I don't think we need that separate action. You can just use the "Load user" action and put the token for the currently logged in user [user:uid] in the user id parameter field. That works for me without a problem.

And if you want to work with 2 users, you just do 2 load actions (you have to rename the variable "loaded user" to something else this time, otherwise it overwrites the variable of user 1).

mitchell’s picture

Status: Active » Fixed

Seems fixed. Please reopen if there's still work to be done here.

Status: Fixed » Closed (fixed)
Issue tags: -Action to load currently logged in user

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