diff options
author | Thomas Willingham <founder@kakste.com> | 2014-04-11 15:11:22 +0100 |
---|---|---|
committer | Thomas Willingham <founder@kakste.com> | 2014-04-11 15:11:22 +0100 |
commit | 81b06754a42685d9e8cad8e5301ceb50175849b6 (patch) | |
tree | 24379dec4bab65a1b2a53337f2717d28cd17c7a8 /include | |
parent | 4582b8dd64a5f4dadc0406e047e441b238087584 (diff) | |
download | volse-hubzilla-81b06754a42685d9e8cad8e5301ceb50175849b6.tar.gz volse-hubzilla-81b06754a42685d9e8cad8e5301ceb50175849b6.tar.bz2 volse-hubzilla-81b06754a42685d9e8cad8e5301ceb50175849b6.zip |
Don't count deleted channels when figuring out where to send a user on login.
Diffstat (limited to 'include')
-rw-r--r-- | include/security.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/security.php b/include/security.php index 282c8ab73..0edbf854d 100644 --- a/include/security.php +++ b/include/security.php @@ -53,8 +53,9 @@ function authenticate_success($user_record, $login_initial = false, $interactive /* 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']) + $r = q("select count(channel_id) as total from channel where channel_account_id = %d and not ( channel_pageflags & %d)", + intval($a->account['account_id']), + intval(PAGE_REMOVED) ); if(($r) && (! $r[0]['total'])) goaway(z_root() . '/new_channel'); |