How-to avoid double post into custom modules

How-to avoid double post into custom modules

Monday 14 December 2009 2:02:10 am - 2 replies

Modified on Monday 14 December 2009 2:03:24 am by Sébastien Antoniotti

Author Message

Łukasz Serwatka

Monday 14 December 2009 2:19:01 am

Hi,

There are few possibilities. Easiest will be set session variable after object was created and check it before. Or set a remote_id for created object which will be a hash included in the POST array and check if object exists with such remote_id if so then you skip creation process.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Sébastien Antoniotti

Monday 14 December 2009 2:47:23 am

Thanks Lukasz for the advice !

Meanwhile I found the following solution which is to redirect in 301 on the confirmation page.

In this way, post data no longer exist.

// redirect
eZHTTPTool::redirect( eZSys::indexDir().'/member/mywallet', array(), 301 );
eZExecution::cleanExit();

Cheers,

Seb

eZ Publish Freelance
web : http://www.webaxis.fr

You must be logged in to post messages in this topic!

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