eZ Publish 4.2 User module to get workflow triggers
The upcoming eZ Publish 4.2 (due September 29th) will add a bunch of workflow triggers to the user module. Workflows will be able to be attached to the following views:
This allows for custom workflow events to be run before and after each of these operations, resulting in a massive increase in the flexibility when interacting with users.
Some potential uses that come to mind:
I would have loved to see triggers added for login and logout but I suspect that would be a more involved exercise.
Unfortunately this enhancement did not make it into eZ Publish 4.2.0alpha1
SVN changes: http://pubsvn.ez.no/websvn2/revision.php?repname=nextgen&path=%2F&rev=23884
Changes were based on the enhancement request http://issues.ez.no/IssueView.php?Id=14882
This allows for custom workflow events to be run before and after each of these operations, resulting in a massive increase in the flexibility when interacting with users.
Some potential uses that come to mind:
- Emailing users upon activation
- Creating user specific content upon activation
- Emailing users when they change their password
I would have loved to see triggers added for login and logout but I suspect that would be a more involved exercise.
Unfortunately this enhancement did not make it into eZ Publish 4.2.0alpha1
SVN changes: http://pubsvn.ez.no/websvn2/revision.php?repname=nextgen&path=%2F&rev=23884
Changes were based on the enhancement request http://issues.ez.no/IssueView.php?Id=14882
Note:
ReplyDelete"Emailing users upon activation"
This is already possible in 4.1 and up using site.ini[UserSettings]VerifyUserType or RegistrationFeedback handlers (see settings/site.ini for details).
But these overrides the default behavior so are more suited for use cases where you want totally custom activation/register email handling. For instance activation using SMS instead of email.
Thanks André - I'm finding a bunch of gems in 4.1 & 4.2 recently. Great to see generic hooks being added!
ReplyDeleteYes, both 4.1 and 4.2 has had some nice minor additions:)
ReplyDeleteSome others in 4.2 besides user triggers:
- #15308: Add group_by support for extended attribute filters (as used by ezstarrating)
- #15315: mysqli Persistent Connections support when using mysqlnd
- #13044: attribute filter and sort by contentobject_id & node_id support
Hey Bruce,
ReplyDeleteThanks for the post. So pumped to see this as a new addition.
According to the changelog this did in fact make it into 4.2, but I can't figure out for the life of me how to set up a workflow when a user activates his account. All I'm really trying to do is create a folder for the newly activated user that he can create content in.
Do you know if there's any documentation anywhere on this? I don't see it in the workflow event dropdown to add it. Perhaps I'm missing something.
Hi Conrad
ReplyDeleteAs far as I'm aware there isn't any official documentation.
Have a look at settings/workflow.ini - you'll have to uncomment out the required AvailableOperationList[] line to get the workflow event to appear in the list.
Cheers
Bruce
You are correct! Took me a little bit to come across it, but thanks for the pointers - I do see it now.
ReplyDeleteI ended up actually going with a custom edit handler, but still good to know that this exists.
Thanks again for the post.