1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-08 15:57:01 +02:00

Add support for an experimental $config->userOutputFormatting setting and update ProcessProfile to support.

This commit is contained in:
Ryan Cramer
2024-07-05 15:48:25 -04:00
parent 18084dd8ef
commit e08fa2e957
4 changed files with 23 additions and 2 deletions

View File

@@ -72,11 +72,15 @@ class ProcessProfile extends Process implements ConfigurableModule, WirePageEdit
}
$this->user = $this->wire()->user;
$of = $this->user->of();
if($of) $this->user->of(false);
$this->headline($this->_("Profile:") . ' ' . $this->user->name); // Primary Headline (precedes the username)
$form = $this->buildForm($fieldName);
if($input->post('submit_save_profile') || $fieldName) {
$this->processInput($form, $fieldName);
if($of) $this->user->of(true);
if($fieldName) {
// no need to redirect
} else {
@@ -84,7 +88,9 @@ class ProcessProfile extends Process implements ConfigurableModule, WirePageEdit
}
} else {
return $form->render();
$out = $form->render();
if($of) $this->user->of(true);
return $out;
}
return '';
}