How to approve new user account ?

Author Message

Pascal France

Friday 10 December 2010 1:42:43 pm

Hi,

Some comments speak about this subject but I don't understand how to create a workflow which approves the new accounts.

How do we achieve such a thing ?

Besides, is an e-mail sent to the responsible of the site to inform him that an account waits to be approved ?

Thanks for your lights !

Pascal

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Quoc Huy Nguyen Dinh

Friday 10 December 2010 5:15:49 pm

Have you tried this:

  1. Setup > Workflows > Standard
  2. Create new workflow named "Content approval"
  3. Add event: Event / Approve: all section, all language, all versions, set your user or user group to approve
  4. Create new workflow named "Before publishing"
  5. Add to it a Multiplexer: All sections, All languages, class = user, affecter version = publishing new, workflow to run = "Content approval"
  6. Setup > Triggers > Content / publish / before = Before publishing

This should send any user registration through the workflow. You will also need to override the template to handle the error message that says something in the line of "Cannot register the new user" to something like "Your registration is pending for approval".

To receive notification, in your dashboard, click on "My notification settings" and in the block "Collaboration notification" tick the box "Approval"

My tutorial on workflows might help: http://share.ez.no/learn/ez-publish/creating-a-simple-custom-workflow-event

Pascal France

Saturday 11 December 2010 2:39:14 am

Thanks Huy,

I followed your steps but this does not work for me.

So here are screenshots of the workflows I created:

  1. The Content approval workflow (created in Setup > Workflows > Standard)
  2. The Before publishing workflow (created in Setup > Workflows > Standard)
  3. The Standard workflow group
  4. The trigger

The problem I encounter is:
when I create an account (from the public site) and submits the form I get the error message you mention.
Before validating this error message (with the button " Back ") I can see in the pendding list in the Dashboard:

First at all, if I confirm the error message on the public site then the pending items list is empty.

Second, if, before validating the error message, I click the link in the pending items list I obtain this:

As you can see, there is no button to reject or approve the content (as it should be the case). The only button available is «Publish».

Well... I am really puzzled !

(I'm using eZP 4.4.0)

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Pascal France

Sunday 12 December 2010 2:16:54 am

In fact, my second step was wrong and has to be exactely as decribed by the steps 4 et 5 of Huy.

Moreover, the new accounts have to be, of course, approved in the «Collaboration» section and not in the list «My pending items» of the dashboard.

An email is sent to the reponsible of the site and to the user who has to approve the creation of his account.

Once the reponsible approved the new account, the script «runcronjobs -s siteaccess frequent» must be executed.

That's all !

Ce qui embellit le désert c'est qu'il cache un puits... quelque part... (A. de Saint-Exupéry) - http://luxpopuli.fr/eZ-Publish

Bertrand Dunogier

Thursday 06 January 2011 7:39:18 am

Hi.

the fact that it crashes in such an obvious way at the moment is actually a regression caused by this fix: http://issues.ez.no/016512.

We (eZ Engineering) have prioritized this particular problem for the current sprint (Matterhorn, then), but are still debating the exact way to go. The cleanest option, on the long term, would be to make user/register an operation of the user module. This operation would look like this:

- send confirmation email
* keep deferred to cron until confirmed by user
- publish the user object
* this will possibly send the user object to the approval workflow
- notify the user that his account has been created

Details remain to be determined, but I think this workflow does make sense. Do you ?

Bertrand Dunogier
eZ Systems Engineering, Lyon
http://twitter.com/bdunogier
http://gplus.to/BertrandDunogier

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.