"getUserId" is now "getLoggedInUserId"

This commit is contained in:
Michael 2021-08-09 20:33:46 +00:00
commit c81e81dc8d
23 changed files with 31 additions and 31 deletions

View file

@ -513,7 +513,7 @@ function events_content(App $a)
$fminute = !empty($orig_event) ? DateTimeFormat::convert($fdt, $tz, 'UTC', 'i') : '00';
if (!$cid && in_array($mode, ['new', 'copy'])) {
$acl = ACL::getFullSelectorHTML(DI::page(), $a->getUserId(), false, ACL::getDefaultUserPermissions($orig_event));
$acl = ACL::getFullSelectorHTML(DI::page(), $a->getLoggedInUserId(), false, ACL::getDefaultUserPermissions($orig_event));
} else {
$acl = '';
}

View file

@ -175,7 +175,7 @@ function follow_process(App $a, string $url)
{
$return_path = 'follow?url=' . urlencode($url);
$result = Contact::createFromProbeForUser($a->getUserId(), $url);
$result = Contact::createFromProbeForUser($a->getLoggedInUserId(), $url);
if ($result['success'] == false) {
// Possibly it is a remote item and not an account

View file

@ -111,7 +111,7 @@ function ostatus_subscribe_content(App $a)
$probed = Contact::getByURL($url);
if (in_array($probed['network'], Protocol::FEDERATED)) {
$result = Contact::createFromProbeForUser($a->getUserId(), $probed['url']);
$result = Contact::createFromProbeForUser($a->getLoggedInUserId(), $probed['url']);
if ($result['success']) {
$o .= ' - ' . DI::l10n()->t('success');
} else {

View file

@ -948,7 +948,7 @@ function photos_content(App $a)
$tpl = Renderer::getMarkupTemplate('photos_upload.tpl');
$aclselect_e = ($visitor ? '' : ACL::getFullSelectorHTML(DI::page(), $a->getUserId()));
$aclselect_e = ($visitor ? '' : ACL::getFullSelectorHTML(DI::page(), $a->getLoggedInUserId()));
$o .= Renderer::replaceMacros($tpl,[
'$pagename' => DI::l10n()->t('Upload Photos'),
@ -961,7 +961,7 @@ function photos_content(App $a)
'$albumselect' => $albumselect,
'$permissions' => DI::l10n()->t('Permissions'),
'$aclselect' => $aclselect_e,
'$lockstate' => ACL::getLockstateForUserId($a->getUserId()) ? 'lock' : 'unlock',
'$lockstate' => ACL::getLockstateForUserId($a->getLoggedInUserId()) ? 'lock' : 'unlock',
'$alt_uploader' => $ret['addon_text'],
'$default_upload_box' => ($ret['default_upload'] ? $default_upload_box : ''),
'$default_upload_submit' => ($ret['default_upload'] ? $default_upload_submit : ''),
@ -1307,7 +1307,7 @@ function photos_content(App $a)
$album_e = $ph[0]['album'];
$caption_e = $ph[0]['desc'];
$aclselect_e = ACL::getFullSelectorHTML(DI::page(), $a->getUserId(), false, ACL::getDefaultUserPermissions($ph[0]));
$aclselect_e = ACL::getFullSelectorHTML(DI::page(), $a->getLoggedInUserId(), false, ACL::getDefaultUserPermissions($ph[0]));
$edit = Renderer::replaceMacros($edit_tpl, [
'$id' => $ph[0]['id'],

View file

@ -69,8 +69,8 @@ function removeme_post(App $a)
DI::emailer()->send($email);
}
if (User::getIdFromPasswordAuthentication($a->getUserId(), trim($_POST['qxz_password']))) {
User::remove($a->getUserId());
if (User::getIdFromPasswordAuthentication($a->getLoggedInUserId(), trim($_POST['qxz_password']))) {
User::remove($a->getLoggedInUserId());
unset($_SESSION['authenticated']);
unset($_SESSION['uid']);

View file

@ -70,7 +70,7 @@ function repair_ostatus_content(App $a) {
$o .= "<p>".DI::l10n()->t("Keep this window open until done.")."</p>";
Contact::createFromProbeForUser($a->getUserId(), $r[0]["url"]);
Contact::createFromProbeForUser($a->getLoggedInUserId(), $r[0]["url"]);
DI::page()['htmlhead'] = '<meta http-equiv="refresh" content="1; URL=' . DI::baseUrl() . '/repair_ostatus?counter='.$counter.'">';

View file

@ -69,7 +69,7 @@ function settings_post(App $a)
return;
}
$user = User::getById($a->getUserId());
$user = User::getById($a->getLoggedInUserId());
if ((DI::args()->getArgc() > 1) && (DI::args()->getArgv()[1] == 'connectors')) {
BaseModule::checkFormSecurityTokenRedirectOnError('/settings/connectors', 'settings_connectors');
@ -590,7 +590,7 @@ function settings_content(App $a)
return;
}
$user = User::getById($a->getUserId());
$user = User::getById($a->getLoggedInUserId());
$username = $user['username'];
$email = $user['email'];
@ -748,7 +748,7 @@ function settings_content(App $a)
'$cntunkmail' => ['cntunkmail', DI::l10n()->t('Maximum private messages per day from unknown people:'), $cntunkmail , DI::l10n()->t("\x28to prevent spam abuse\x29")],
'$group_select' => Group::displayGroupSelection(local_user(), $user['def_gid']),
'$permissions' => DI::l10n()->t('Default Post Permissions'),
'$aclselect' => ACL::getFullSelectorHTML(DI::page(), $a->getUserId()),
'$aclselect' => ACL::getFullSelectorHTML(DI::page(), $a->getLoggedInUserId()),
'$expire' => [
'label' => DI::l10n()->t('Expiration settings'),