Skip to content

Commit

Permalink
Merge pull request #180 from skaut/chyba-neaktualizovane-displayname
Browse files Browse the repository at this point in the history
aktualizace displayName při změně jména při registraci
  • Loading branch information
Jan Staněk authored Nov 4, 2016
2 parents 592dfc1 + 19d18e0 commit 6d441c5
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 6d441c5

Please sign in to comment.