aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/channel.php9
-rw-r--r--include/nav.php23
-rw-r--r--include/zot.php3
3 files changed, 20 insertions, 15 deletions
diff --git a/include/channel.php b/include/channel.php
index 488bdeef0..d7116ce28 100644
--- a/include/channel.php
+++ b/include/channel.php
@@ -2308,7 +2308,7 @@ function profile_store_lowlevel($arr) {
// It is the caller's responsibility to confirm the requestor's intent and
// authorisation to do this.
-function account_remove($account_id,$local = true,$unset_session=true) {
+function account_remove($account_id,$local = true,$unset_session = true) {
logger('account_remove: ' . $account_id);
@@ -2353,13 +2353,12 @@ function account_remove($account_id,$local = true,$unset_session=true) {
if ($unset_session) {
- unset($_SESSION['authenticated']);
- unset($_SESSION['uid']);
- notice( sprintf(t("User '%s' deleted"),$account_email) . EOL);
+ App::$session->nuke();
+ notice( sprintf(t('Account \'%s\' deleted'),$account_email) . EOL);
goaway(z_root());
}
- return $r;
+ return $r;
}
/**
diff --git a/include/nav.php b/include/nav.php
index 6fd7d527b..89947e270 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -148,15 +148,20 @@ EOT;
}
else {
if(! get_account_id()) {
- $nav['login'] = login(true,'main-login',false,false);
- $nav['loginmenu'][] = ['login',t('Login'),'',t('Sign in'),'login_nav_btn'];
- App::$page['content'] .= replace_macros(get_markup_template('nav_login.tpl'),
- [
- '$nav' => $nav,
- 'userinfo' => $userinfo
- ]
- );
-
+ if(App::$module === 'channel') {
+ $nav['login'] = login(true,'main-login',false,false);
+ $nav['loginmenu'][] = ['login',t('Login'),'',t('Sign in'),''];
+ }
+ else {
+ $nav['login'] = login(true,'main-login',false,false);
+ $nav['loginmenu'][] = ['login',t('Login'),'',t('Sign in'),'login_nav_btn'];
+ App::$page['content'] .= replace_macros(get_markup_template('nav_login.tpl'),
+ [
+ '$nav' => $nav,
+ 'userinfo' => $userinfo
+ ]
+ );
+ }
}
else
$nav['alogout'] = ['logout',t('Logout'), "", t('End this session'),'logout_nav_btn'];
diff --git a/include/zot.php b/include/zot.php
index 3fa62445c..55632fc31 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -312,6 +312,7 @@ function zot_refresh($them, $channel = null, $force = false) {
logger('zot_refresh: ' . $url, LOGGER_DATA, LOG_INFO);
+
$result = z_post_url($url . $rhs,$postvars);
if ($result['success']) {
@@ -4045,7 +4046,7 @@ function zotinfo($arr) {
$id = $e['channel_id'];
- $x = [ 'channel_id' => $id, 'protocols' => 'zot' ];
+ $x = [ 'channel_id' => $id, 'protocols' => ['zot'] ];
call_hooks('channel_protocols',$x);
$protocols = $x['protocols'];