Browse code

Temporay fix contao 4.8+ incompatibility with extension terminal42/contao-mailusername

Benjamin Roth authored on18/02/2020 00:13:27
Showing1 changed files
... ...
@@ -80,6 +80,12 @@ class ModuleRegistration extends \Contao\ModuleRegistration
80 80
     }
81 81
     $this->editable = $arrEditable;
82 82
 
83
+    // Prevent empty password exception in Contao >= 4.8 in password not username validation
84
+    if (\Input::post('FORM_SUBMIT') == 'tl_registration_' . $this->id && \Input::post('username') == '' && \Input::post('email'))
85
+    {
86
+      \Input::setPost('username',\Input::post('email'));
87
+    }
88
+
83 89
     parent::compile();
84 90
 
85 91
   }