aboutsummaryrefslogtreecommitdiffstats
path: root/include/security.php
diff options
context:
space:
mode:
authorTony Baldwin <tonybaldwin@gmx.com>2014-03-09 19:22:54 -0400
committerTony Baldwin <tonybaldwin@gmx.com>2014-03-09 19:22:54 -0400
commit5cca00ddc79dad667464674e08a2a860e262eabd (patch)
tree53df980e32a6706e977a5a2276e0f9aa9ec09300 /include/security.php
parent67166180bb560276273a20bcd9ca2a7aae036aba (diff)
parenta79072ce478a999b06df38ae324fbcef6d3a76e7 (diff)
downloadvolse-hubzilla-5cca00ddc79dad667464674e08a2a860e262eabd.tar.gz
volse-hubzilla-5cca00ddc79dad667464674e08a2a860e262eabd.tar.bz2
volse-hubzilla-5cca00ddc79dad667464674e08a2a860e262eabd.zip
Merge remote-tracking branch 'upstream/master'
Conflicts: view/theme/redbasic/tpl/theme_settings.tpl reset to upstream
Diffstat (limited to 'include/security.php')
-rw-r--r--include/security.php18
1 files changed, 16 insertions, 2 deletions
diff --git a/include/security.php b/include/security.php
index 5e86cf790..f52615357 100644
--- a/include/security.php
+++ b/include/security.php
@@ -32,9 +32,12 @@ function authenticate_success($user_record, $login_initial = false, $interactive
}
- if($login_initial)
+ if($login_initial) {
+
call_hooks('logged_in', $user_record);
-
+
+ // might want to log success here
+ }
if($return || x($_SESSION,'workflow')) {
unset($_SESSION['workflow']);
@@ -47,6 +50,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 */
}