X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=mod%2Fregister.php;h=73b57124a21613219d5f4363f05991a3eb789f81;hb=f2ca3e5be44192c486e8e3af2a993e065ad40a7d;hp=41d39f4158204b09792e084f9c732d790bd3066a;hpb=ec0d3a6eac4b1a1551649253167c6eed96cdd53f;p=friendica.git
diff --git a/mod/register.php b/mod/register.php
index 41d39f4158..73b57124a2 100644
--- a/mod/register.php
+++ b/mod/register.php
@@ -9,6 +9,7 @@ use Friendica\Content\Text\BBCode;
use Friendica\Core\Addon;
use Friendica\Core\Config;
use Friendica\Core\L10n;
+use Friendica\Core\Logger;
use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Core\Worker;
@@ -63,7 +64,7 @@ function register_post(App $a)
$arr['blocked'] = $blocked;
$arr['verified'] = $verified;
- $arr['language'] = L10n::getBrowserLanguage();
+ $arr['language'] = L10n::detectLanguage();
try {
$result = Model\User::create($arr);
@@ -100,7 +101,7 @@ function register_post(App $a)
if ($res) {
info(L10n::t('Registration successful. Please check your email for further instructions.') . EOL);
- goaway();
+ $a->internalRedirect();
} else {
notice(
L10n::t('Failed to send email message. Here your accout details:
login: %s
password: %s
You can change your password after login.',
@@ -111,12 +112,12 @@ function register_post(App $a)
}
} else {
info(L10n::t('Registration successful.') . EOL);
- goaway();
+ $a->internalRedirect();
}
} elseif (intval(Config::get('config', 'register_policy')) === REGISTER_APPROVE) {
if (!strlen(Config::get('config', 'admin_email'))) {
notice(L10n::t('Your registration can not be processed.') . EOL);
- goaway();
+ $a->internalRedirect();
}
Model\Register::createForApproval($user['uid'], Config::get('system', 'language'), $_POST['permonlybox']);
@@ -159,7 +160,7 @@ function register_post(App $a)
);
info(L10n::t('Your registration is pending approval by the site owner.') . EOL);
- goaway();
+ $a->internalRedirect();
}
return;
@@ -186,7 +187,7 @@ function register_content(App $a)
if ($max_dailies) {
$r = q("select count(*) as total from user where register_date > UTC_TIMESTAMP - INTERVAL 1 day");
if ($r && $r[0]['total'] >= $max_dailies) {
- logger('max daily registrations exceeded.');
+ Logger::log('max daily registrations exceeded.');
notice(L10n::t('This site has exceeded the number of allowed daily account registrations. Please try again tomorrow.') . EOL);
return;
}