]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/register.php
Merge branch '0.9.x' into finish-account-api
[quix0rs-gnu-social.git] / actions / register.php
index b40ac266d2eceb6d5f869e6f70bdf59fd3b4645f..c4f6760aa9b3e8a2f53ee949b18c78acfed01d33 100644 (file)
@@ -55,6 +55,12 @@ class RegisterAction extends Action
 
     var $registered = false;
 
+    /**
+     * Are we processing an invite?
+     */
+
+    var $invite = null;
+
     /**
      * Prepare page to run
      *
@@ -136,6 +142,12 @@ class RegisterAction extends Action
         }
     }
 
+    function showScripts()
+    {
+        parent::showScripts();
+        $this->autofocus('nickname');
+    }
+
     /**
      * Try to register a user
      *
@@ -162,7 +174,7 @@ class RegisterAction extends Action
             $bio      = $this->trimmed('bio');
             $location = $this->trimmed('location');
 
-            // We don't trim these... whitespace is OK in a password!
+            // We do not trim these... whitespace is OK in a password!
             $password = $this->arg('password');
             $confirm  = $this->arg('confirm');
 
@@ -185,7 +197,7 @@ class RegisterAction extends Action
             if (!$this->boolean('license')) {
                 $this->showForm(_('You can\'t register if you don\'t '.
                                   'agree to the license.'));
-            } else if ($email && !Validate::email($email, true)) {
+            } else if ($email && !Validate::email($email, common_config('email', 'check_domain'))) {
                 $this->showForm(_('Not a valid email address.'));
             } else if (!Validate::string($nickname, array('min_length' => 1,
                                                           'max_length' => 64,