From b4ca35129f524ecbcc4d8260b10784d2fb31e9e3 Mon Sep 17 00:00:00 2001 From: "K.Kakihara" Date: Wed, 24 Aug 2022 21:24:32 +0900 Subject: [PATCH] =?UTF-8?q?=E7=AE=A1=E7=90=86=E8=80=85=E3=83=AD=E3=82=B0?= =?UTF-8?q?=E3=82=A4=E3=83=B3=E7=94=BB=E9=9D=A2=E3=81=AEID,=20PW=E3=81=AE?= =?UTF-8?q?=E9=95=B7=E3=81=95=E5=88=B6=E9=99=90=E3=82=92eccube.yaml?= =?UTF-8?q?=E3=81=AE=E8=A8=AD=E5=AE=9A=E5=80=A4=E3=81=AB=E3=81=9D=E3=82=8D?= =?UTF-8?q?=E3=81=88=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Eccube/Form/Type/Admin/LoginType.php | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/Eccube/Form/Type/Admin/LoginType.php b/src/Eccube/Form/Type/Admin/LoginType.php index 5f7152619f1..8c4cca69949 100644 --- a/src/Eccube/Form/Type/Admin/LoginType.php +++ b/src/Eccube/Form/Type/Admin/LoginType.php @@ -13,6 +13,7 @@ namespace Eccube\Form\Type\Admin; +use Eccube\Common\EccubeConfig; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\PasswordType; use Symfony\Component\Form\Extension\Core\Type\TextType; @@ -23,13 +24,21 @@ class LoginType extends AbstractType { + /** + * @var EccubeConfig + */ + protected $eccubeConfig; + /** * @var SessionInterface */ protected $session; - public function __construct(SessionInterface $session) - { + public function __construct( + EccubeConfig $eccubeConfig, + SessionInterface $session + ) { + $this->eccubeConfig = $eccubeConfig; $this->session = $session; } @@ -40,7 +49,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('login_id', TextType::class, [ 'attr' => [ - 'maxlength' => 50, + 'maxlength' => $this->eccubeConfig['eccube_id_max_len'], ], 'constraints' => [ new Assert\NotBlank(), @@ -49,7 +58,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) ]); $builder->add('password', PasswordType::class, [ 'attr' => [ - 'maxlength' => 50, + 'maxlength' => $this->eccubeConfig['eccube_password_max_len'], ], 'constraints' => [ new Assert\NotBlank(),