PUGX / PUGXMultiUserBundle

An extension for FOSUserBundle to handle users of different types. Compatible with Doctrine ORM.
163 stars 96 forks source link

Problem with listener #146

Closed padalec closed 7 years ago

padalec commented 7 years ago

Hi there I found a little bug in https://github.com/PUGX/PUGXMultiUserBundle/blob/master/Controller/RegistrationManager.php#L60 you return only result response when result is RedirectRespons but right now I use JsonRespons in my listener and my response isn't returned. This fix this issues: if ($result instanceof Response) { return $result; }

bplaa-yai commented 7 years ago

Hi, I think this commit is the cause of issue #151 If I'm not wrong, the manager's logic is to return FOSUB's response only in case of success (in which case it's an instance of RedirectResponse), else it returns its own response with the customized form and so on. By returning FOSUB's response if it's an instance of Response (which it always is), the manager never gets an opportunity to return its own response.

bplaa-yai commented 7 years ago

@garak any thoughts on this ?

garak commented 7 years ago

It's hard to tell for me, since I don't use this bundle since a while

ldesmeules commented 7 years ago

I confirm this commit is the cause of issue #151 I need to reverse changes to return the template in config

Ardinis commented 6 years ago

I confirm too.