aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-02-20 18:38:52 -0800
committerfriendica <info@friendica.com>2014-02-20 18:38:52 -0800
commit8367a922144f0aeafb084300427959e4f254f27a (patch)
tree885cc060801fe6bfde25fe9bcc8c1eb2615a526d /include
parente12f6f1bd93bb42bf0fe9fc9d9a1ff08cd162a0d (diff)
downloadvolse-hubzilla-8367a922144f0aeafb084300427959e4f254f27a.tar.gz
volse-hubzilla-8367a922144f0aeafb084300427959e4f254f27a.tar.bz2
volse-hubzilla-8367a922144f0aeafb084300427959e4f254f27a.zip
fix login weirdness for accounts that need to be approved
Diffstat (limited to 'include')
-rw-r--r--include/security.php11
-rw-r--r--include/zot.php5
2 files changed, 11 insertions, 5 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 */
}
diff --git a/include/zot.php b/include/zot.php
index a7094b2ad..298abb178 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -1279,11 +1279,6 @@ function allowed_public_recips($msg) {
if(array_key_exists('public_scope',$msg['message']))
$scope = $msg['message']['public_scope'];
- // we can pull out these two lines once everybody has upgraded to >= 2013-02-15.225
-
- else
- $scope = 'public';
-
$hash = base64url_encode(hash('whirlpool',$msg['notify']['sender']['guid'] . $msg['notify']['sender']['guid_sig'], true));
if($scope === 'public' || $scope === 'network: red')