mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 00:55:19 +00:00
fix login weirdness for accounts that need to be approved
This commit is contained in:
parent
e12f6f1bd9
commit
8367a92214
2 changed files with 11 additions and 5 deletions
|
@ -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 */
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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')
|
||||
|
|
Loading…
Reference in a new issue