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;
$arr['blocked'] = $blocked;
$arr['verified'] = $verified;
- $arr['language'] = L10n::getBrowserLanguage();
+ $arr['language'] = L10n::detectLanguage();
try {
$result = Model\User::create($arr);
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:<br> login: %s<br> password: %s<br><br>You can change your password after login.',
}
} 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']);
);
info(L10n::t('Your registration is pending approval by the site owner.') . EOL);
- goaway();
+ $a->internalRedirect();
}
return;
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;
}