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:
@@ -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 '';
|
||||
}
|
||||
|
Reference in New Issue
Block a user