castiron / cicregister

TYPO3 Front-end User Registration and Login (ExtBase/Fluid)
14 stars 4 forks source link

Exception on mail validation link fails #3

Open AndreasA opened 11 years ago

AndreasA commented 11 years ago

If the mail validation fails, there is an exception because in validateUser in the else branch of the instanceof if, this is called $this->handleBehaviorResponse($this->doBehaviors($frontendUser, 'emailValidationFailure', $forward), $frontendUser);

However, handleBehaviorResponse expects $frontendUser to be of a correct type and therefore an exception is thrown. Best would be to create a frontendUser before calling handleBehaviorResponse.

zdavis commented 11 years ago

AndreasA,

Thanks for this. We'll see if we can put together a fix for it today.

best Zach

AndreasA commented 11 years ago

OK, thanks.

what needs to also be mentioned is that, of course, this issue also needs to be addressed for behaviors and decorators as those are also called with a forced type.

zdavis commented 11 years ago

It's odd that behaviors or decorators are being called at all on an invalid frontendUser object. Those should only be called if the frontendUser has already been created. Can you provide me with a clear set of steps to reproduce the problem?

Zach

AndreasA commented 11 years ago

Not, if I am using emailValidationFailure - there I want to use behaviors that are called on error, e.g. to add a flash message (which works fine without a valid frontend user)

Basically in the same case as the above error.