diff options
author | Mario Vavti <mario@mariovavti.com> | 2021-12-17 22:05:45 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2021-12-17 22:05:45 +0100 |
commit | 78972725aed933cca1b626749ab9b423eaea86a5 (patch) | |
tree | 5f90df656b2f4c23a5df06d8d9f64af5f7328a1a /Zotlabs | |
parent | 5ab90f77915f8c2f6ccd1342e524703e5753bf2c (diff) | |
download | volse-hubzilla-78972725aed933cca1b626749ab9b423eaea86a5.tar.gz volse-hubzilla-78972725aed933cca1b626749ab9b423eaea86a5.tar.bz2 volse-hubzilla-78972725aed933cca1b626749ab9b423eaea86a5.zip |
mod tokens cleanup and fixes
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Module/Tokens.php | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/Zotlabs/Module/Tokens.php b/Zotlabs/Module/Tokens.php index 632e816ce..b1c8bb4bf 100644 --- a/Zotlabs/Module/Tokens.php +++ b/Zotlabs/Module/Tokens.php @@ -110,8 +110,8 @@ class Tokens extends Controller { // If this is a new token, create a new abook record - $closeness = get_pconfig($uid,'system','new_abook_closeness',80); - $profile_assign = get_pconfig($uid,'system','profile_assign',''); + $closeness = get_pconfig($channel['channel_id'], 'system', 'new_abook_closeness',80); + $profile_assign = get_pconfig($channel['channel_id'], 'system', 'profile_assign', ''); $r = abook_store_lowlevel( [ @@ -132,11 +132,10 @@ class Tokens extends Controller { } /** If there is a default group for this channel, add this connection to it */ - if ($channel['channel_default_group']) { - $g = AccessList::by_hash($uid,$channel['channel_default_group']); + $g = AccessList::by_hash($channel['channel_id'], $channel['channel_default_group']); if ($g) { - AccessList::member_add($uid,'',$atoken_xchan,$g['id']); + AccessList::member_add($channel['channel_id'], '', $atoken_xchan,$g['id']); } } } @@ -281,8 +280,8 @@ class Tokens extends Controller { $o .= replace_macros($tpl, array( '$form_security_token' => get_form_security_token("tokens"), '$permcat' => ['permcat', t('Select a role for this token'), $current_permcat, '', $permcats], - '$title' => t('Guest Access Tokens'), - '$desc' => $desc, + '$title' => t('Guest Access Tokens'), + '$desc' => $desc, '$desc2' => $desc2, '$tokens' => $t, '$atoken' => $atoken, @@ -291,15 +290,7 @@ class Tokens extends Controller { '$name' => array('name', t('Login Name') . ' <span class="required">*</span>', (($atoken) ? $atoken['atoken_name'] : ''),''), '$token'=> array('token', t('Login Password') . ' <span class="required">*</span>',(($atoken) ? $atoken['atoken_token'] : autoname(8)), ''), '$expires'=> array('expires', t('Expires (yyyy-mm-dd)'), (($atoken['atoken_expires'] && $atoken['atoken_expires'] > NULL_DATE) ? datetime_convert('UTC',date_default_timezone_get(),$atoken['atoken_expires']) : ''), ''), - '$them' => t('Their Settings'), - '$me' => t('My Settings'), - '$perms' => $perms, - '$inherited' => t('inherited'), - '$notself' => 1, - '$self' => 0, - '$permlbl' => t('Individual Permissions'), - '$permnote' => t('Some permissions may be inherited from your channel\'s <a href="settings"><strong>privacy settings</strong></a>, which have higher priority than individual settings. You can <strong>not</strong> change those settings here.'), - '$submit' => t('Submit') + '$submit' => t('Submit') )); return $o; } |