From 592dfc1f2a5c2ef022744179bf1d577960051945 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Stan=C4=9Bk?= Date: Thu, 3 Nov 2016 01:23:55 +0100 Subject: [PATCH] =?UTF-8?q?oprava=20chyby=20p=C5=99i=20zm=C4=9Bn=C4=9B=20p?= =?UTF-8?q?ersonID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/forms/AttendeeForm.php | 1 - app/model/Authenticator.php | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/forms/AttendeeForm.php b/app/forms/AttendeeForm.php index 7687f8141..b63407ef9 100644 --- a/app/forms/AttendeeForm.php +++ b/app/forms/AttendeeForm.php @@ -80,7 +80,6 @@ public function __construct(IContainer $parent = NULL, $name = NULL, $translator $checkRolesCapacity = function($field, $database) { $values = $this->getComponent('roles')->getRawValue(); - $user = $database->getRepository('\SRS\Model\User')->findOneBy(array('id' => $this->getForm()->getHttpData()['id'])); foreach ($values as $value) { $role = $database->getRepository('\SRS\Model\Acl\Role')->findOneBy(array('id' => $value)); diff --git a/app/model/Authenticator.php b/app/model/Authenticator.php index 25033f911..efc26e55e 100644 --- a/app/model/Authenticator.php +++ b/app/model/Authenticator.php @@ -68,6 +68,8 @@ public function authenticate(array $credentials) $user->securityCode = $skautISUser->SecurityCode; /*----------------------------------------------------------------------*/ + $user->skautISPersonId = $skautISUser->ID_Person; + $this->database->flush(); $netteRoles = array();