Index: kernel/user/register.php
===================================================================
--- kernel/user/register.php	(revision 24372)
+++ kernel/user/register.php	(working copy)
@@ -97,7 +97,20 @@
         return $Result;
     }
     // else create user object
-    
+
+    if ( $http->hasSessionVariable( 'StartedRegistration' ) )
+    {
+        eZDebug::writeWarning( 'Cancel module run to protect against multiple form submits', 'user/register' );
+        $http->removeSessionVariable( "RegisterUserID" );
+        $http->removeSessionVariable( 'StartedRegistration' );
+        $db->commit();
+        return eZModule::HOOK_STATUS_CANCEL_RUN;
+    }
+    else if ( $http->hasPostVariable( 'PublishButton' ) or $http->hasPostVariable( 'CancelButton' ) )
+    {
+        $http->setSessionVariable( 'StartedRegistration', 1 );
+    }
+
     $ini = eZINI::instance();
     $errMsg = '';
     $checkErrNodeId = false;
@@ -137,6 +150,15 @@
 }
 else
 {
+    if ( $http->hasSessionVariable( 'StartedRegistration' ) )
+    {
+        eZDebug::writeWarning( 'Cancel module run to protect against multiple form submits', 'user/register' );
+        $http->removeSessionVariable( "RegisterUserID" );
+        $http->removeSessionVariable( 'StartedRegistration' );
+        $db->commit();
+        return eZModule::HOOK_STATUS_CANCEL_RUN;
+    }
+
     $userID = $http->sessionVariable( "RegisterUserID" );
 }
 
@@ -164,6 +186,7 @@
 
             $http = eZHTTPTool::instance();
             $http->removeSessionVariable( "RegisterUserID" );
+            $http->removeSessionVariable( 'StartedRegistration' );
             return eZModule::HOOK_STATUS_CANCEL_RUN;
         }
 
@@ -328,6 +351,7 @@
 
             $http->removeSessionVariable( "GeneratedPassword" );
             $http->removeSessionVariable( "RegisterUserID" );
+            $http->removeSessionVariable( 'StartedRegistration' );
 
             // check for redirectionvariable
             if ( $http->hasSessionVariable( 'RedirectAfterUserRegister' ) )
Index: design/standard/templates/user/register.tpl
===================================================================
--- design/standard/templates/user/register.tpl	(revision 24372)
+++ design/standard/templates/user/register.tpl	(working copy)
@@ -43,18 +43,30 @@
 
     <div class="buttonblock">
     {if and( is_set( $checkErrNodeId ), $checkErrNodeId )|not()}
-        <input class="button" type="submit" name="PublishButton" value="{'Register'|i18n('design/standard/user')}" />
+        <input class="button" type="submit" id="PublishButton" name="PublishButton" value="{'Register'|i18n('design/standard/user')}" onclick="window.setTimeout( disableButtons, 1 ); return true;" />
     {else}
-        <input class="button" type="submit" name="PublishButton" disabled="disabled" value="{'Register'|i18n('design/standard/user')}" />
+        <input class="button" type="submit" id="PublishButton" name="PublishButton" disabled="disabled" value="{'Register'|i18n('design/standard/user')}" onclick="window.setTimeout( disableButtons, 1 ); return true;" />
     {/if}
-        <input class="button" type="submit" name="CancelButton" value="{'Discard'|i18n('design/standard/user')}" />
+        <input class="button" type="submit" id="CancelButton" name="CancelButton" value="{'Discard'|i18n('design/standard/user')}" onclick="window.setTimeout( disableButtons, 1 ); return true;" />
     </div>
 {section-else}
     <div class="warning">
         <h2>{"Unable to register new user"|i18n("design/standard/user")}</h2>
     </div>
     <div class="buttonblock">
-        <input class="button" type="submit" name="CancelButton" value="{'Back'|i18n('design/standard/user')}" />
+        <input class="button" type="submit" id="CancelButton" name="CancelButton" value="{'Back'|i18n('design/standard/user')}" onclick="window.setTimeout( disableButtons, 1 ); return true;" />
     </div>
 {/section}
 </form>
+
+{literal}
+<script language="JavaScript" type="text/javascript">
+<!--
+    function disableButtons()
+    {
+        document.getElementById( 'PublishButton' ).disabled = true;
+        document.getElementById( 'CancelButton' ).disabled = true;
+    }
+-->
+</script>
+{/literal}
Index: design/admin/templates/user/register.tpl
===================================================================
--- design/admin/templates/user/register.tpl	(revision 24372)
+++ design/admin/templates/user/register.tpl	(working copy)
@@ -36,8 +36,8 @@
 <div class="controlbar">
 {* DESIGN: Control bar START *}<div class="box-bc"><div class="box-ml"><div class="box-mr"><div class="box-tc"><div class="box-bl"><div class="box-br">
     <div class="block">
-        <input class="button" type="submit" name="PublishButton" value="{'OK'|i18n( 'design/admin/user/register' )}" />
-        <input class="button" type="submit" name="CancelButton" value="{'Cancel'|i18n( 'design/admin/user/register' )}" />
+        <input class="button" type="submit" id="PublishButton" name="PublishButton" value="{'OK'|i18n( 'design/admin/user/register' )}" onclick="window.setTimeout( disableButtons, 1 ); return true;" />
+        <input class="button" type="submit" id="CancelButton" name="CancelButton" value="{'Cancel'|i18n( 'design/admin/user/register' )}" onclick="window.setTimeout( disableButtons, 1 ); return true;" />
     </div>
 {* DESIGN: Control bar END *}</div></div></div></div></div></div>
 </div>
@@ -52,7 +52,7 @@
 <div class="controlbar">
 {* DESIGN: Control bar START *}<div class="box-bc"><div class="box-ml"><div class="box-mr"><div class="box-tc"><div class="box-bl"><div class="box-br">
     <div class="block">
-        <input class="button" type="submit" name="CancelButton" value="{'Back'|i18n( 'design/admin/user/register' )}" />
+        <input class="button" type="submit" id="CancelButton" name="CancelButton" value="{'Back'|i18n( 'design/admin/user/register' )}" onclick="window.setTimeout( disableButtons, 1 ); return true;" />
     </div>
 {* DESIGN: Control bar END *}</div></div></div></div></div></div>
 </div>
@@ -82,6 +82,12 @@
             }
         }
     }
+
+    function disableButtons()
+    {
+        document.getElementById( 'PublishButton' ).disabled = true;
+        document.getElementById( 'CancelButton' ).disabled = true;
+    }
 -->
 </script>
 {/literal}
