diff options
author | friendica <info@friendica.com> | 2012-08-27 21:17:46 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-08-27 21:17:46 -0700 |
commit | 7fad83cea4dd134df6dacf8248ef6947dca7f100 (patch) | |
tree | c4a8174b8dac64949e874b9149456e2541050f1c /mod | |
parent | 8c3c3d5fd7acc5df0aec9c10f8bdd89bedd2060a (diff) | |
download | volse-hubzilla-7fad83cea4dd134df6dacf8248ef6947dca7f100.tar.gz volse-hubzilla-7fad83cea4dd134df6dacf8248ef6947dca7f100.tar.bz2 volse-hubzilla-7fad83cea4dd134df6dacf8248ef6947dca7f100.zip |
Now logging in with Red zaccount/zentity instead of Friendica user. Yay. Most existing Friendica functionality is now stuffed since the Red structures are quite different.
Diffstat (limited to 'mod')
-rw-r--r-- | mod/settings.php | 61 | ||||
-rw-r--r-- | mod/zentity.php | 6 | ||||
-rw-r--r-- | mod/zregister.php | 13 |
3 files changed, 27 insertions, 53 deletions
diff --git a/mod/settings.php b/mod/settings.php index 38d0490bf..478158b68 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -16,35 +16,6 @@ function get_theme_config_file($theme){ function settings_init(&$a) { - // These lines provide the javascript needed by the acl selector - - $a->page['htmlhead'] .= "<script> var ispublic = '" . t('everybody') . "';" ; - - $a->page['htmlhead'] .= <<< EOT - - $(document).ready(function() { - - $('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() { - var selstr; - $('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() { - selstr = $(this).text(); - $('#jot-perms-icon').removeClass('unlock').addClass('lock'); - $('#jot-public').hide(); - }); - if(selstr == null) { - $('#jot-perms-icon').removeClass('lock').addClass('unlock'); - $('#jot-public').show(); - } - - }).trigger('change'); - - }); - - </script> -EOT; - - - $tabs = array( array( 'label' => t('Account settings'), @@ -671,15 +642,17 @@ function settings_content(&$a) { if(count($p)) $profile = $p[0]; - $username = $a->user['username']; - $email = $a->user['email']; - $nickname = $a->user['nickname']; - $timezone = $a->user['timezone']; - $notify = $a->user['notify-flags']; - $defloc = $a->user['default-location']; - $openid = $a->user['openid']; - $maxreq = $a->user['maxreq']; - $expire = ((intval($a->user['expire'])) ? $a->user['expire'] : ''); + load_pconfig(local_user(),'expire'); + + $username = $a->identity['entity_name']; + $email = $a->account['account_email']; + $nickname = $a->identity['entity_address']; + $timezone = $a->identity['entity_timezone']; + $notify = $a->identity['entity_notifyflags']; + $defloc = $a->identity['entity_location']; + + $maxreq = $a->identity['entity_max_friend_req']; + $expire = get_pconfig(local_user(),'expire','content_expire_days'); $blockwall = $a->user['blockwall']; $blocktags = $a->user['blocktags']; $unkmail = $a->user['unkmail']; @@ -714,8 +687,7 @@ function settings_content(&$a) { $post_profilechange = (($post_profilechange===false)? '0': $post_profilechange); // default if not set: 0 - if(! strlen($a->user['timezone'])) - $timezone = date_default_timezone_get(); + $timezone = date_default_timezone_get(); @@ -744,15 +716,6 @@ function settings_content(&$a) { )); - $noid = get_config('system','no_openid'); - - if($noid) { - $openid_field = false; - } - else { - $openid_field = array('openid_url', t('OpenID:'),$openid, t("\x28Optional\x29 Allow this OpenID to login to this account.")); - } - $opt_tpl = get_markup_template("field_yesno.tpl"); if(get_config('system','publish_all')) { diff --git a/mod/zentity.php b/mod/zentity.php index 74403cfb5..9e90dd263 100644 --- a/mod/zentity.php +++ b/mod/zentity.php @@ -73,7 +73,11 @@ function zentity_post(&$a) { return; } - return; + if(! strlen($next_page = get_config('system','workflow_identity_next'))) + $next_page = 'settings'; + + goaway(z_root() . '/' . $next_page); + } diff --git a/mod/zregister.php b/mod/zregister.php index a9a622213..478921c3f 100644 --- a/mod/zregister.php +++ b/mod/zregister.php @@ -75,7 +75,6 @@ function zregister_post(&$a) { } require_once('include/security.php'); - authenticate_success($result['account'],true,true); $using_invites = intval(get_config('system','invitation_only')); $num_invites = intval(get_config('system','number_invites')); @@ -90,7 +89,6 @@ function zregister_post(&$a) { $res = send_verification_email($result['email'],$result['password']); if($res) { info( t('Registration successful. Please check your email for validation instructions.') . EOL ) ; - goaway(z_root()); } } elseif($policy == REGISTER_APPROVE) { @@ -103,7 +101,16 @@ function zregister_post(&$a) { } goaway(z_root()); } - return; + + authenticate_success($result['account'],true,false,true); + + if(! strlen($next_page = get_config('system','workflow_register_next'))) + $next_page = 'zentity'; + + $_SESSION['workflow'] = true; + + goaway(z_root() . '/' . $next_page); + } |