X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fregister.php;h=cd6385144cd21e660b13327d073b60f136357160;hb=f22fe7118d52251dbd0898279ef078b797885ec4;hp=cb9c1729f5891f93021e7f04da2982e91cd22941;hpb=541d6ab8959fe3c069996e230def126c154da34d;p=friendica.git diff --git a/mod/register.php b/mod/register.php index cb9c1729f5..cd6385144c 100644 --- a/mod/register.php +++ b/mod/register.php @@ -1,7 +1,10 @@ $_POST); call_hooks('register_post', $arr); - $max_dailies = intval(get_config('system','max_daily_registrations')); + $max_dailies = intval(Config::get('system','max_daily_registrations')); 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) { @@ -69,11 +72,11 @@ function register_post(App $a) { if($netpublish && $a->config['register_policy'] != REGISTER_APPROVE) { $url = System::baseUrl() . '/profile/' . $user['nickname']; - proc_run(PRIORITY_LOW, "include/directory.php", $url); + Worker::add(PRIORITY_LOW, "Directory", $url); } - $using_invites = get_config('system','invitation_only'); - $num_invites = get_config('system','number_invites'); + $using_invites = Config::get('system','invitation_only'); + $num_invites = Config::get('system','number_invites'); $invite_id = ((x($_POST,'invite_id')) ? notags(trim($_POST['invite_id'])) : ''); @@ -81,7 +84,7 @@ function register_post(App $a) { if($using_invites && $invite_id) { q("delete * from register where hash = '%s' limit 1", dbesc($invite_id)); - set_pconfig($user['uid'],'system','invites_remaining',$num_invites); + PConfig::set($user['uid'],'system','invites_remaining',$num_invites); } // Only send a password mail when the password wasn't manually provided @@ -129,7 +132,7 @@ function register_post(App $a) { // invite system if($using_invites && $invite_id) { q("delete * from register where hash = '%s' limit 1", dbesc($invite_id)); - set_pconfig($user['uid'],'system','invites_remaining',$num_invites); + PConfig::set($user['uid'],'system','invites_remaining',$num_invites); } // send email to admins @@ -182,7 +185,7 @@ function register_content(App $a) { // even with closed registrations, unless specifically prohibited by site policy. // 'block_extended_register' blocks all registrations, period. - $block = get_config('system','block_extended_register'); + $block = Config::get('system','block_extended_register'); if(local_user() && ($block)) { notice("Permission denied." . EOL); @@ -194,7 +197,7 @@ function register_content(App $a) { return; } - $max_dailies = intval(get_config('system','max_daily_registrations')); + $max_dailies = intval(Config::get('system','max_daily_registrations')); 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) { @@ -217,7 +220,7 @@ function register_content(App $a) { $photo = ((x($_POST,'photo')) ? $_POST['photo'] : ((x($_GET,'photo')) ? hex2bin($_GET['photo']) : '')); $invite_id = ((x($_POST,'invite_id')) ? $_POST['invite_id'] : ((x($_GET,'invite_id')) ? $_GET['invite_id'] : '')); - $noid = get_config('system','no_openid'); + $noid = Config::get('system','no_openid'); if($noid) { $oidhtml = ''; @@ -236,7 +239,7 @@ function register_content(App $a) { $realpeople = ''; // t('Members of this network prefer to communicate with real people who use their real names.'); - if(get_config('system','publish_all')) { + if(Config::get('system','publish_all')) { $profile_publish_reg = ''; } else { @@ -266,7 +269,7 @@ function register_content(App $a) { $o = replace_macros($o, array( '$oidhtml' => $oidhtml, - '$invitations' => get_config('system','invitation_only'), + '$invitations' => Config::get('system','invitation_only'), '$permonly' => $a->config['register_policy'] == REGISTER_APPROVE, '$permonlybox' => array('permonlybox', t('Note for the admin'), '', t('Leave a message for the admin, why you want to join this node')), '$invite_desc' => t('Membership on this site is by invitation only.'), @@ -282,7 +285,7 @@ function register_content(App $a) { '$oidlabel' => $oidlabel, '$openid' => $openid_url, '$namelabel' => t('Your Full Name ' . "\x28" . 'e.g. Joe Smith, real or real-looking' . "\x29" . ': '), - '$addrlabel' => t('Your Email Address: '), + '$addrlabel' => t('Your Email Address: (Initial information will be send there, so this has to be an existing address.)'), '$passwords' => $passwords, '$password1' => array('password1', t('New Password:'), '', t('Leave empty for an auto generated password.')), '$password2' => array('confirm', t('Confirm:'), '', ''),