Skip to content

Commit

Permalink
aktualizace displayName při změně jména při registraci
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Staněk committed Nov 4, 2016
1 parent 592dfc1 commit 19d18e0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/forms/AttendeeForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,10 @@ public function submitted()
$user->setProperties($values, $this->presenter->context->database);
$user->approved = $approved;

$user->displayName = "{$user->lastName} {$user->firstName}";
if ($user->nickName != '')
$user->displayName .= " ({$user->nickName})";

$this->presenter->context->database->flush();
$this->presenter->flashMessage('Registrace odeslána. Pro další informace o stavu registrace, platbě a semináři se musíte znovu přihlásit.', 'success forever');
$this->presenter->user->logout(true);
Expand Down

0 comments on commit 19d18e0

Please sign in to comment.