mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 23:55:19 +00:00
mod_home: if using an atoken login on the home page redirect to the channel page of the channel that owns the atoken.
This commit is contained in:
parent
da5ec98f98
commit
dcb3c2c299
1 changed files with 13 additions and 0 deletions
|
@ -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');
|
||||
|
|
Loading…
Reference in a new issue