Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [Symfony 2][FOSUserBundle] There is no user provider for user
ZiaRek
post 24.11.2015, 10:22:18
Post #1





Grupa: Zarejestrowani
Postów: 42
Pomógł: 0
Dołączył: 25.09.2013

Ostrzeżenie: (0%)
-----


Korzystam z FOSUserBundle, ale mam własny Model i Manager. Pomimo tego że w security.yml

  1. form_login:
  2. provider: fos_userbundle


oraz

  1. providers:
  2. fos_userbundle:
  3. id: fos_user.user_provider.username_email


który prowadzi do security.xml z vendors FOSUserBundla

  1. <service id="fos_user.user_provider.username_email" class="FOS\UserBundle\Security\EmailUserProvider" public="false">
  2. <argument type="service" id="fos_user.user_manager" />
  3. </service>


a fos_user.user_manager zdefiniowałem w services.yml jako własną klase

  1. fos_user_manager.class : Core\Module\User\Infrastructure\FOSUserManager
  2.  
  3. fos_user.user_manager:
  4. class: %fos_user_manager.class%
  5. arguments: [@user.user_profile_repository]


Mój własny manager FOSUserManager, implementuje klasy UserManagerInterface, UserProviderInterface i posiada metodę findUserByUsernameOrEmail() która zwraca mój własny zdefiniowany FOSUserModel który implementuje UserInterface a wkonstruktorze przekazuje moją własną encję userProfile.

Pomimo tego wszystkiego po próbie logowania dostaje komunikat : There is no user provider for user "Core\Module\User\Infrastructure\FOSUserModel".
.
Metodę unserialize() mam aktualnie pustą.
Jeśli zakomentuje treść metody serialize() w FOSUserModel, to tak jak u tego gościa
http://stackoverflow.com/questions/1679549...henticated-user
loguje mnie z authentication YES, logged as "PUSTA PRZESTRZEŃ"

Dlaczego There is no user provider skoro jest zdefiniowany ?

Ten post edytował ZiaRek 24.11.2015, 10:31:27
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 16.07.2025 - 08:17