aboutsummaryrefslogtreecommitdiffstats
path: root/mod/zentity.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-08-26 23:05:00 -0700
committerfriendica <info@friendica.com>2012-08-26 23:05:00 -0700
commit5ff6e9348b41bc87b03bafc4d9df73b383af074e (patch)
treec26b1b26cd38f7ec78e83905266053618a3e1db4 /mod/zentity.php
parentf0e299a97a8c46fd66bbc47e5b84d4b76d763154 (diff)
downloadvolse-hubzilla-5ff6e9348b41bc87b03bafc4d9df73b383af074e.tar.gz
volse-hubzilla-5ff6e9348b41bc87b03bafc4d9df73b383af074e.tar.bz2
volse-hubzilla-5ff6e9348b41bc87b03bafc4d9df73b383af074e.zip
a few minor changes
Diffstat (limited to 'mod/zentity.php')
-rw-r--r--mod/zentity.php41
1 files changed, 5 insertions, 36 deletions
diff --git a/mod/zentity.php b/mod/zentity.php
index 274c5f28c..74403cfb5 100644
--- a/mod/zentity.php
+++ b/mod/zentity.php
@@ -61,7 +61,7 @@ function zentity_post(&$a) {
$arr = $_POST;
- if(($uid = intval(local_user())) == 0) {
+ if(($arr['account_id'] = get_account_id()) === false) {
notice( t('Permission denied.') . EOL );
return;
}
@@ -84,44 +84,13 @@ function zentity_post(&$a) {
function zentity_content(&$a) {
-
- if((! local_user()) && ($a->config['register_policy'] == REGISTER_CLOSED)) {
- notice("Permission denied." . EOL);
+ if(! get_account_id()) {
+ notice( t('Permission denied.') . EOL);
return;
}
- $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");
- 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);
- return;
- }
- }
-
- // Configurable terms of service link
-
- $tosurl = get_config('system','tos_url');
- if(! $tosurl)
- $tosurl = $a->get_baseurl() . '/help/TermsOfService';
-
- $toslink = '<a href="' . $tosurl . '" >' . t('Terms of Service') . '</a>';
-
- // Configurable whether to restrict age or not - default is based on international legal requirements
- // This can be relaxed if you are on a restricted server that does not share with public servers
-
- if(get_config('system','no_age_restriction'))
- $label_tos = sprintf( t('I accept the %s for this website'), $toslink);
- else
- $label_tos =
-
-
- $email = ((x($_REQUEST,'email')) ? $_REQUEST['email'] : "" );
- $password = ((x($_REQUEST,'password')) ? $_REQUEST['password'] : "" );
- $password2 = ((x($_REQUEST,'password2')) ? $_REQUEST['password2'] : "" );
- $invite_code = ((x($_REQUEST,'invite_code')) ? $_REQUEST['invite_code'] : "" );
-
+ $name = ((x($_REQUEST,'name')) ? $_REQUEST['name'] : "" );
+ $nickname = ((x($_REQUEST,'nickname')) ? $_REQUEST['nickname'] : "" );
$o = replace_macros(get_markup_template('zentity.tpl'), array(