[TWIG][Cards] Fullname is now displayed as the note author, nickname as an identification.

[CONTROLLER][Security] Fullname is set on resgistration to enable it to be shown by default in notes.
[CONTROLLER][UserPanel] Fullname extra step added.
[CSS] Fullname and nickname representation work.
This commit is contained in:
2021-10-26 14:47:28 +01:00
parent 51c984849f
commit 3e2fefa8af
7 changed files with 36 additions and 12 deletions

View File

@@ -102,8 +102,9 @@ class UserPanel extends AbstractController
['self_tags', TextType::class, ['label' => _m('Self Tags'), 'required' => false, 'help' => _m('Tags for yourself (letters, numbers, -, ., and _), comma- or space-separated.'), 'transformer' => ArrayTransformer::class]],
['save_personal_info', SubmitType::class, ['label' => _m('Save personal info')]],
];
$extra_step = function ($data, $extra_args) use ($user) {
$extra_step = function ($data, $extra_args) use ($user, $actor) {
$user->setNickname($data['nickname']);
if (!$data['full_name'] && !$actor->getFullname()) { $actor->setFullname($data['nickname']); }
};
return Form::handle($form_definition, $request, $actor, $extra, $extra_step, [['self_tags' => $extra['self_tags']]]);
}