aboutsummaryrefslogtreecommitdiffstats
path: root/include/security.php
diff options
context:
space:
mode:
authorzottel <github@zottel.net>2014-02-21 08:54:46 +0100
committerzottel <github@zottel.net>2014-02-21 08:54:46 +0100
commit8bd006bea83b3dbc02d94b4714a658e8742d9633 (patch)
tree078e9d4b634d583de8359ddae94c69d86ec19d17 /include/security.php
parent79c566bda33645f42f8545fdc6e55af35c4a7d5c (diff)
parent44d7047fce57085fe63ad5e1088911e9fc07a32e (diff)
downloadvolse-hubzilla-8bd006bea83b3dbc02d94b4714a658e8742d9633.tar.gz
volse-hubzilla-8bd006bea83b3dbc02d94b4714a658e8742d9633.tar.bz2
volse-hubzilla-8bd006bea83b3dbc02d94b4714a658e8742d9633.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'include/security.php')
-rw-r--r--include/security.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/security.php b/include/security.php
index 5e86cf790..68dd573f7 100644
--- a/include/security.php
+++ b/include/security.php
@@ -47,6 +47,17 @@ function authenticate_success($user_record, $login_initial = false, $interactive
goaway($a->get_baseurl() . '/' . $return_url);
}
+ /* This account has never created a channel. Send them to new_channel by default */
+
+ if($a->module === 'login') {
+ $r = q("select count(channel_id) as total from channel where channel_account_id = %d",
+ intval($a->account['account_id'])
+ );
+ if(($r) && (! $r[0]['total']))
+ goaway(z_root() . '/new_channel');
+ }
+
+ /* else just return */
}