]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/register.php
Ticket #2273: Fix bookmarklet with URls with special characters
[quix0rs-gnu-social.git] / actions / register.php
index 584ad3ead49428b74ce12bb9ad201ef51e73c76c..ccab76cf0193af51e161624f054e8b05681292c6 100644 (file)
@@ -82,14 +82,14 @@ class RegisterAction extends Action
         }
 
         if (common_config('site', 'inviteonly') && empty($this->code)) {
-            $this->clientError(_('Sorry. Only those invited can register.'));
+            $this->clientError(_('Sorry, only invited people can register.'));
             return false;
         }
 
         if (!empty($this->code)) {
             $this->invite = Invitation::staticGet('code', $this->code);
             if (empty($this->invite)) {
-                $this->clientError(_('Sorry. This is an invalid invitation code.'));
+                $this->clientError(_('Sorry, invalid invitation code.'));
                 return false;
             }
             // Store this in case we need it
@@ -186,7 +186,7 @@ class RegisterAction extends Action
             }
 
             if (common_config('site', 'inviteonly') && !($code && $invite)) {
-                $this->clientError(_('Sorry. Only those invited can register.'));
+                $this->clientError(_('Sorry, only invited people can register.'));
                 return;
             }
 
@@ -259,6 +259,7 @@ class RegisterAction extends Action
 
                 // Re-init language env in case it changed (not yet, but soon)
                 common_init_language();
+
                 $this->showSuccess();
             } else {
                 $this->showForm(_('Invalid username or password.'));
@@ -279,7 +280,7 @@ class RegisterAction extends Action
     function nicknameExists($nickname)
     {
         $user = User::staticGet('nickname', $nickname);
-        return ($user !== false);
+        return is_object($user);
     }
 
     /**
@@ -299,7 +300,7 @@ class RegisterAction extends Action
             return false;
         }
         $user = User::staticGet('email', $email);
-        return ($user !== false);
+        return is_object($user);
     }
 
     // overrrided to add entry-title class
@@ -401,7 +402,7 @@ class RegisterAction extends Action
         }
 
         if (common_config('site', 'inviteonly') && !($code && $invite)) {
-            $this->clientError(_('Sorry. Only those invited can register.'));
+            $this->clientError(_('Sorry, only invited people can register.'));
             return;
         }
 
@@ -534,15 +535,15 @@ class RegisterAction extends Action
                                        array('nickname' => $nickname));
 
         $this->elementStart('div', 'success');
-        $instr = sprintf(_('Congratulations, %s! And welcome to %%%%site.name%%%%. '.
+        $instr = sprintf(_('Congratulations, %1$s! And welcome to %%%%site.name%%%%. '.
                            'From here, you may want to...'. "\n\n" .
-                           '* Go to [your profile](%s) '.
+                           '* Go to [your profile](%2$s) '.
                            'and post your first message.' .  "\n" .
                            '* Add a [Jabber/GTalk address]'.
                            '(%%%%action.imsettings%%%%) '.
                            'so you can send notices '.
                            'through instant messages.' . "\n" .
-                           '* [Search for users](%%%%action.peoplesearch%%%%) '.
+                           '* [Search for people](%%%%action.peoplesearch%%%%) '.
                            'that you may know or '.
                            'that share your interests. ' . "\n" .
                            '* Update your [profile settings]'.