{"action":"created","issue":{"url":"https://api.github.com/repos/FriendsOfSymfony/FOSUserBundle/issues/2194","repository_url":"https://api.github.com/repos/FriendsOfSymfony/FOSUserBundle","labels_url":"https://api.github.com/repos/FriendsOfSymfony/FOSUserBundle/issues/2194/labels{/name}","comments_url":"https://api.github.com/repos/FriendsOfSymfony/FOSUserBundle/issues/2194/comments","events_url":"https://api.github.com/repos/FriendsOfSymfony/FOSUserBundle/issues/2194/events","html_url":"https://github.com/FriendsOfSymfony/FOSUserBundle/pull/2194","id":170226031,"number":2194,"title":"Add user manipulator events","user":{"login":"javihgil","id":2581053,"avatar_url":"https://avatars.githubusercontent.com/u/2581053?v=3","gravatar_id":"","url":"https://api.github.com/users/javihgil","html_url":"https://github.com/javihgil","followers_url":"https://api.github.com/users/javihgil/followers","following_url":"https://api.github.com/users/javihgil/following{/other_user}","gists_url":"https://api.github.com/users/javihgil/gists{/gist_id}","starred_url":"https://api.github.com/users/javihgil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javihgil/subscriptions","organizations_url":"https://api.github.com/users/javihgil/orgs","repos_url":"https://api.github.com/users/javihgil/repos","events_url":"https://api.github.com/users/javihgil/events{/privacy}","received_events_url":"https://api.github.com/users/javihgil/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/FriendsOfSymfony/FOSUserBundle/labels/Enhancement","name":"Enhancement","color":"02d7e1"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/FriendsOfSymfony/FOSUserBundle/milestones/4","html_url":"https://github.com/FriendsOfSymfony/FOSUserBundle/milestones/2.0","labels_url":"https://api.github.com/repos/FriendsOfSymfony/FOSUserBundle/milestones/4/labels","id":124377,"number":4,"title":"2.0","description":"","creator":{"login":"stof","id":439401,"avatar_url":"https://avatars.githubusercontent.com/u/439401?v=3","gravatar_id":"","url":"https://api.github.com/users/stof","html_url":"https://github.com/stof","followers_url":"https://api.github.com/users/stof/followers","following_url":"https://api.github.com/users/stof/following{/other_user}","gists_url":"https://api.github.com/users/stof/gists{/gist_id}","starred_url":"https://api.github.com/users/stof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stof/subscriptions","organizations_url":"https://api.github.com/users/stof/orgs","repos_url":"https://api.github.com/users/stof/repos","events_url":"https://api.github.com/users/stof/events{/privacy}","received_events_url":"https://api.github.com/users/stof/received_events","type":"User","site_admin":false},"open_issues":25,"closed_issues":32,"state":"open","created_at":"2012-05-26T15:26:08Z","updated_at":"2016-09-06T12:22:33Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2016-08-09T17:36:29Z","updated_at":"2016-09-07T08:05:35Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/FriendsOfSymfony/FOSUserBundle/pulls/2194","html_url":"https://github.com/FriendsOfSymfony/FOSUserBundle/pull/2194","diff_url":"https://github.com/FriendsOfSymfony/FOSUserBundle/pull/2194.diff","patch_url":"https://github.com/FriendsOfSymfony/FOSUserBundle/pull/2194.patch"},"body":"Existing events allows to integrate some significative points of user actions (register, login, etc.)\r\n\r\nIn my case I want to create an Profile entity associated to the user when it's registered. Listening for FOSUserEvents::REGISTRATION_SUCCESS event I can do this with a simple listener method.\r\n\r\nNow I have to import some users from other platform, and I'm doing this calling fos:user:create command from a script. Also I want to send an email with account migration info.\r\n\r\nNo command launches any event, so I can not interact with this action. All the fos:user:x commands\r\nuse the UserManipulator class to do their actions. In the same way, if you use the \"fos_user.util.user_manipulator\" service directly to do some action over the users, you will have the same problem.\r\n\r\nSo, I propose to include some events fired by the UserManipulator to solve this issue:\r\n\r\n    FosUserEvents::USER_CREATED\r\n    FosUserEvents::USER_PASSWORD_CHANGED\r\n    FosUserEvents::USER_ACTIVATED\r\n    FosUserEvents::USER_DEACTIVATED\r\n    FosUserEvents::USER_PROMOTED\r\n    FosUserEvents::USER_DEMOTED\r\n"},"comment":{"url":"https://api.github.com/repos/FriendsOfSymfony/FOSUserBundle/issues/comments/245206229","html_url":"https://github.com/FriendsOfSymfony/FOSUserBundle/pull/2194#issuecomment-245206229","issue_url":"https://api.github.com/repos/FriendsOfSymfony/FOSUserBundle/issues/2194","id":245206229,"user":{"login":"XWB","id":1032281,"avatar_url":"https://avatars.githubusercontent.com/u/1032281?v=3","gravatar_id":"","url":"https://api.github.com/users/XWB","html_url":"https://github.com/XWB","followers_url":"https://api.github.com/users/XWB/followers","following_url":"https://api.github.com/users/XWB/following{/other_user}","gists_url":"https://api.github.com/users/XWB/gists{/gist_id}","starred_url":"https://api.github.com/users/XWB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/XWB/subscriptions","organizations_url":"https://api.github.com/users/XWB/orgs","repos_url":"https://api.github.com/users/XWB/repos","events_url":"https://api.github.com/users/XWB/events{/privacy}","received_events_url":"https://api.github.com/users/XWB/received_events","type":"User","site_admin":false},"created_at":"2016-09-07T08:05:35Z","updated_at":"2016-09-07T08:05:35Z","body":"@javihgil Can you also squash all three commits?"}}
{"actor":{"display_login":"XWB"}}