$bio = $this->trimmed('bio');
$location = $this->trimmed('location');
- // We do not trim these... whitespace is OK in a password!
+ // We don't trim these... whitespace is OK in a password!
$password = $this->arg('password');
$confirm = $this->arg('confirm');
// Re-init language env in case it changed (not yet, but soon)
common_init_language();
+
$this->showSuccess();
} else {
$this->showForm(_('Invalid username or password.'));
function nicknameExists($nickname)
{
$user = User::staticGet('nickname', $nickname);
- return ($user !== false);
+ return is_object($user);
}
/**
return false;
}
$user = User::staticGet('email', $email);
- return ($user !== false);
+ return is_object($user);
}
// overrrided to add entry-title class
$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 = '<a href="' .
+ htmlspecialchars(common_config('license', 'url')) .
+ '">' .
+ htmlspecialchars(common_config('license', 'title')) .
+ '</a>';
+ $this->raw(sprintf(htmlspecialchars($message), $link));
$this->elementEnd('label');
$this->elementEnd('li');
}
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%%%%) '.