aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-07-15 15:26:36 -0700
committerredmatrix <git@macgirvin.com>2016-07-15 15:26:36 -0700
commitdcb3c2c299057467105200e298a03d7b2ee072e8 (patch)
treeb95a202ba0d6fa37b94c9a8051f4972bb6cb4ce6
parentda5ec98f98dd8cef034d568bf0f67231e8517bd4 (diff)
downloadvolse-hubzilla-dcb3c2c299057467105200e298a03d7b2ee072e8.tar.gz
volse-hubzilla-dcb3c2c299057467105200e298a03d7b2ee072e8.tar.bz2
volse-hubzilla-dcb3c2c299057467105200e298a03d7b2ee072e8.zip
mod_home: if using an atoken login on the home page redirect to the channel page of the channel that owns the atoken.
-rw-r--r--Zotlabs/Module/Home.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/Zotlabs/Module/Home.php b/Zotlabs/Module/Home.php
index f3ba96fdd..79449c3b2 100644
--- a/Zotlabs/Module/Home.php
+++ b/Zotlabs/Module/Home.php
@@ -28,6 +28,19 @@ class Home extends \Zotlabs\Web\Controller {
goaway($dest);
}
+
+ if(remote_channel() && (! $splash) && $_SESSION['atoken']) {
+ $r = q("select * from atoken where atoken_id = %d",
+ intval($_SESSION['atoken'])
+ );
+ if($r) {
+ $x = channelx_by_n($r[0]['atoken_uid']);
+ if($x) {
+ goaway(z_root() . '/channel/' . $x['channel_address']);
+ }
+ }
+ }
+
if(get_account_id() && ! $splash) {
goaway(z_root() . '/new_channel');