X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fregister.php;h=d1bc381fbc52358ea8ed7d9dcc01deda5a0a0c04;hb=c15549ff5a787a8014e54a50aa0fdfc0055ffcde;hp=100ab74242c74a4244739a3fcc46a56ca937c027;hpb=c012b278f00664470e74a0009791e8b2bca2a5e3;p=quix0rs-gnu-social.git diff --git a/actions/register.php b/actions/register.php index 100ab74242..d1bc381fbc 100644 --- a/actions/register.php +++ b/actions/register.php @@ -55,6 +55,12 @@ class RegisterAction extends Action var $registered = false; + /** + * Are we processing an invite? + */ + + var $invite = null; + /** * Prepare page to run * @@ -191,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, @@ -253,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.')); @@ -273,7 +280,7 @@ class RegisterAction extends Action function nicknameExists($nickname) { $user = User::staticGet('nickname', $nickname); - return ($user !== false); + return is_object($user); } /** @@ -293,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 @@ -334,7 +341,7 @@ class RegisterAction extends Action } else { $instr = common_markup_to_html(_('With this form you can create '. - ' a new account. ' . + 'a new account. ' . 'You can then post notices and '. 'link up to friends and colleagues. ')); @@ -484,11 +491,15 @@ class RegisterAction extends Action $this->elementStart('li'); $this->element('input', $attrs); $this->elementStart('label', array('class' => 'checkbox', 'for' => 'license')); - $this->text(_('My text and files are available under ')); - $this->element('a', array('href' => common_config('license', 'url')), - common_config('license', 'title'), _("Creative Commons Attribution 3.0")); - $this->text(_(' except this private data: password, '. - 'email address, IM address, and phone number.')); + $message = _('My text and files are available under %s ' . + 'except this private data: password, ' . + 'email address, IM address, and phone number.'); + $link = '' . + htmlspecialchars(common_config('license', 'title')) . + ''; + $this->raw(sprintf(htmlspecialchars($message), $link)); $this->elementEnd('label'); $this->elementEnd('li'); } @@ -528,9 +539,9 @@ 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%%%%) '.