From 7fad83cea4dd134df6dacf8248ef6947dca7f100 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 27 Aug 2012 21:17:46 -0700 Subject: 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. --- mod/settings.php | 61 +++++++++++-------------------------------------------- mod/zentity.php | 6 +++++- mod/zregister.php | 13 +++++++++--- 3 files changed, 27 insertions(+), 53 deletions(-) (limited to 'mod') 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'] .= " -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); + } -- cgit v1.2.3