X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fregister.php;h=6ac28305953fc7b1644c48bdcb297ea984cf1fff;hb=7e6870db914d4e905fc7ae833b69404fd3ea0d3d;hp=76e6ede5541e00d2b5d103599631dda1839da96a;hpb=d361bad9e149d4ee95ebdd0c43a87f80613d5200;p=quix0rs-gnu-social.git diff --git a/actions/register.php b/actions/register.php index 76e6ede554..6ac2830595 100644 --- a/actions/register.php +++ b/actions/register.php @@ -159,6 +159,20 @@ class RegisterAction extends Action { return FALSE; } + # Everyone is subscribed to themself + + $subscription = new Subscription(); + $subscription->subscriber = $user->id; + $subscription->subscribed = $user->id; + $subscription->created = $user->created; + + $result = $subscription->insert(); + + if (!$result) { + common_log_db_error($subscription, 'INSERT', __FILE__); + return FALSE; + } + if ($email) { $confirm = new Confirm_address(); @@ -225,10 +239,14 @@ class RegisterAction extends Action { $this->boolean('rememberme'), _('Automatically login in the future; not for shared computers!')); common_element_start('p'); - common_element('input', array('type' => 'checkbox', - 'id' => 'license', - 'name' => 'license', - 'value' => ($this->boolean('license')) ? 'true' : 'false')); + $attrs = array('type' => 'checkbox', + 'id' => 'license', + 'name' => 'license', + 'value' => 'true'); + if ($this->boolean('license')) { + $attrs['checked'] = 'checked'; + } + common_element('input', $attrs); common_text(_('My text and files are available under ')); common_element('a', array(href => $config['license']['url']), $config['license']['title']); @@ -243,21 +261,23 @@ class RegisterAction extends Action { $nickname = $this->arg('nickname'); common_show_header(_('Registration successful')); common_element_start('div', 'success'); - $instr = sprintf(_('Congratulations, %s! And welcome to %%site.name%%. From here, you may want to...' . - '* Go to [your profile](%s) and post your first message.' . - '* Add a [Jabber/GTalk address](%%action.imsettings%%) so you can send notices through instant messages.' . - '* (Search for people)[%%action.peoplesearch%%] that you may know or that share your interests. ' . - '* Update your [profile settings](%%action.profilesettings%%) to tell others more about you. ' . - '* Read over the [online docs](%%doc.help%%) for features you may have missed. ' . + $instr = sprintf(_('Congratulations, %s! And welcome to %%%%site.name%%%%. From here, you may want to...'. "\n\n" . + '* Go to [your profile](%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 people](%%%%action.peoplesearch%%%%) that you may know or that share your interests. ' . "\n" . + '* Update your [profile settings](%%%%action.profilesettings%%%%) to tell others more about you. ' . "\n" . + '* Read over the [online docs](%%%%doc.help%%%%) for features you may have missed. ' . "\n\n" . 'Thanks for signing up and we hope you enjoy using this service.'), $nickname, common_local_url('showstream', array('nickname' => $nickname))); common_raw(common_markup_to_html($instr)); $have_email = $this->trimmed('email'); if ($have_email) { - $emailinstr = _t('(You should receive a message by email momentarily, with ' . - 'instructions on how to confirm your email address.)'); + $emailinstr = _('(You should receive a message by email momentarily, with ' . + 'instructions on how to confirm your email address.)'); common_raw(common_markup_to_html($emailinstr)); } + common_element_end('div'); + common_show_footer(); } }