FriendsOfSymfony/FOSUserBundle — pull request #937 by scribblet (2013-01-09 05:02:01+00:00)
Title: Corrected FOSUserEvents.php comment pointing to wrong event

/**
* The REGISTRATION_INITIALIZE event occurs when the registration process is initialized.
*
* This event allows you to modify the default values of the user before binding the form.
* The event listener method receives a FOS\UserBundle\Event\GetResponseUserEvent instance.
*/
const REGISTRATION_INITIALIZE = 'fos_user.registration.initialize';

REGISTRATION_INITIALIZE event listeners actually receive a UserEvent object as detailed in this line of code from RegistrationController.php line 46:

$dispatcher->dispatch(FOSUserEvents::REGISTRATION_INITIALIZE, new UserEvent($user, $request));