From 982034b87d341c0bbada64b48d8488a5d2ff711c Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 31 Jan 2013 17:55:52 -0800 Subject: update friends in common tool now that poco is working --- mod/register.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mod/register.php') diff --git a/mod/register.php b/mod/register.php index dbf8d25b7..494e72b8f 100644 --- a/mod/register.php +++ b/mod/register.php @@ -30,7 +30,7 @@ function register_post(&$a) { $max_dailies = intval(get_config('system','max_daily_registrations')); if($max_dailies) { - $r = q("select count(*) as total from account where account_created > UTC_TIMESTAMP - INTERVAL 1 day"); + $r = q("select count(account_id) as total from account where account_created > UTC_TIMESTAMP() - INTERVAL 1 day"); if($r && $r[0]['total'] >= $max_dailies) { notice( t('Maximum daily site registrations exceeded. Please try again tomorrow.') . EOL); return; @@ -129,7 +129,7 @@ function register_content(&$a) { $max_dailies = intval(get_config('system','max_daily_registrations')); if($max_dailies) { - $r = q("select count(*) as total from account where account_created > UTC_TIMESTAMP - INTERVAL 1 day"); + $r = q("select count(account_id) as total from account where account_created > UTC_TIMESTAMP() - INTERVAL 1 day"); if($r && $r[0]['total'] >= $max_dailies) { logger('max daily registrations exceeded.'); notice( t('This site has exceeded the number of allowed daily account registrations. Please try again tomorrow.') . EOL); -- cgit v1.2.3 From 62afdf38202ee9f09011bef599506e3a5ee37528 Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 8 Feb 2013 03:51:31 -0800 Subject: more register_approve stuff - like the admin page. Hopefully this won't conflict with Thomas's admin page "list users" changes --- mod/register.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mod/register.php') diff --git a/mod/register.php b/mod/register.php index 494e72b8f..3ba714c74 100644 --- a/mod/register.php +++ b/mod/register.php @@ -51,7 +51,7 @@ function register_post(&$a) { break; case REGISTER_APPROVE: - $flags = ACCOUNT_UNVERIFIED | ACCOUNT_BLOCKED; + $flags = ACCOUNT_UNVERIFIED | ACCOUNT_BLOCKED | ACCOUNT_PENDING; break; default: -- cgit v1.2.3 From a88437a1ef75c688e36788c70e53c02e873e9740 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 4 Sep 2013 22:23:53 -0700 Subject: issue #107 --- mod/register.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mod/register.php') diff --git a/mod/register.php b/mod/register.php index 3ba714c74..bc1603f25 100644 --- a/mod/register.php +++ b/mod/register.php @@ -64,6 +64,12 @@ function register_post(&$a) { break; } + + if((! $_POST['password']) || ($_POST['password'] !== $_POST['password2'])) { + notice( t('Passwords do not match.') . EOL); + return; + } + $arr = $_POST; $arr['account_flags'] = $flags; -- cgit v1.2.3 From d7ee552c570f4fca760c3d1573f32c005cf73bb8 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 20 Nov 2013 15:20:12 -0800 Subject: Protocol: now set data['alg'] on all encapsulated encrypted packets, so that we can more easily retire 'aes256cbc' once it is no longer viable. --- mod/register.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mod/register.php') diff --git a/mod/register.php b/mod/register.php index bc1603f25..2040732ff 100644 --- a/mod/register.php +++ b/mod/register.php @@ -7,6 +7,14 @@ function register_init(&$a) { $result = null; $cmd = ((argc() > 1) ? argv(1) : ''); + // Provide a stored request for somebody desiring a connection + // when they first need to register someplace. Once they've + // created a channel, we'll try to revive the connection request + // and process it. + + if($_REQUEST['connect']) + $_SESSION['connect'] = $_REQUEST['connect']; + switch($cmd) { case 'invite_check.json': $result = check_account_invite($_REQUEST['invite_code']); -- cgit v1.2.3 From ca05565fcc51ebcbb032a800c4ee22074d3bad44 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 22 Dec 2013 20:07:18 -0800 Subject: one step closer to merging register and pubsites pages --- mod/register.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mod/register.php') diff --git a/mod/register.php b/mod/register.php index 2040732ff..3f1fc5400 100644 --- a/mod/register.php +++ b/mod/register.php @@ -137,8 +137,8 @@ function register_content(&$a) { if(get_config('system','register_policy') == REGISTER_CLOSED) { - notice("Permission denied." . EOL); - return; + require_once('mod/pubsites.php'); + return pubsites_content($a); } $max_dailies = intval(get_config('system','max_daily_registrations')); -- cgit v1.2.3 From eda7c24c4ef45c88287ee6580af5d373c3676da9 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 25 Dec 2013 16:53:59 -0800 Subject: improve the register text until the new register page is finished --- mod/register.php | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'mod/register.php') diff --git a/mod/register.php b/mod/register.php index 3f1fc5400..990cce2ed 100644 --- a/mod/register.php +++ b/mod/register.php @@ -135,12 +135,19 @@ function register_post(&$a) { function register_content(&$a) { + $registration_is = ''; + $other_sites = ''; if(get_config('system','register_policy') == REGISTER_CLOSED) { require_once('mod/pubsites.php'); return pubsites_content($a); } + if(get_config('system','register_policy') == REGISTER_APPROVE) { + $registration_is = t('Registration on this site/hub is by approval only.'); + $other_sites = t('Register at another affiliated site/hub'); + } + $max_dailies = intval(get_config('system','max_daily_registrations')); if($max_dailies) { $r = q("select count(account_id) as total from account where account_created > UTC_TIMESTAMP() - INTERVAL 1 day"); @@ -175,10 +182,14 @@ function register_content(&$a) { $invite_code = ((x($_REQUEST,'invite_code')) ? strip_tags(trim($_REQUEST['invite_code'])) : "" ); + + $o = replace_macros(get_markup_template('register.tpl'), array( '$title' => t('Registration'), + '$reg_is' => $registration_is, '$registertext' => get_config('system','register_text'), + '$other_sites' => $other_sites, '$invitations' => get_config('system','invitation_only'), '$invite_desc' => t('Membership on this site is by invitation only.'), '$label_invite' => t('Please enter your invitation code'), -- cgit v1.2.3