]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/register.php
Merge branch 'backupaccount-xml' into 'nightly'
[quix0rs-gnu-social.git] / actions / register.php
index 15b6b23cabed0c6c0c347bfadd768248fd9dcf3d..6f23244d13526d2ac2d5898e53bf9bcadcbee15d 100644 (file)
@@ -120,9 +120,9 @@ class RegisterAction extends Action
      *
      * @return void
      */
-    function handle($args)
+    function handle()
     {
-        parent::handle($args);
+        parent::handle();
 
         if (common_config('site', 'closed')) {
             // TRANS: Client error displayed when trying to register to a closed site.
@@ -131,7 +131,11 @@ class RegisterAction extends Action
             // TRANS: Client error displayed when trying to register while already logged in.
             $this->clientError(_('Already logged in.'));
         } else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
-            $this->tryRegister();
+            try {
+                $this->tryRegister();
+            } catch (ClientException $e) {
+                $this->showForm($e->getMessage());
+            }
         } else {
             $this->showForm();
         }
@@ -479,6 +483,7 @@ class RegisterAction extends Action
                            'id' => 'license',
                            'class' => 'checkbox',
                            'name' => 'license',
+                           'required' => 'true',
                            'value' => 'true');
             if ($this->boolean('license')) {
                 $attrs['checked'] = 'checked';