rollerworks-graveyard / RollerworksMultiUserBundle

Multi user management for the FOSUserBundle - DISCONTINUED!!
MIT License
56 stars 21 forks source link

Added discriminated events functionality. #17

Closed d00001 closed 10 years ago

d00001 commented 11 years ago

issue #14

Hey,

This is a simple implementation of this feature. Let me now what do you think. Basically listener subscribes to all FOSUserEvents and when any of those events is fired it dispatches a new event by prefixing the user system name to the original event name.

I did not define constants for the new event names because I wasn't sure what would be the best way to do it. What do you think should global constants be defined with this new event names?

sstok commented 11 years ago

Ah wait the constants of the FOSUserBundle are class constants, and we cant define constants at runtime for existing classes so this would properly be our best shot. The values seem pretty stable (last time changed was 8 months ago).

When introducing the skeleton creator #1 we can create an Events class so actual constants can be used.

Can you add some tests and add the missing header? https://github.com/rollerworks/RollerworksMultiUserBundle/blob/master/src/Rollerworks/Bundle/MultiUserBundle/Model/UserDiscriminator.php#L3-L10

Thanks.

d00001 commented 10 years ago

Hey I would like to complete this request. I am very new to git and pull requests. I initially made the pull request some months ago but there have been new commits. What is the correct way to update the branch from the masters? Do I just merge changes?

sstok commented 10 years ago

You can update your branch by using git rebase. http://symfony.com/doc/current/contributing/code/patches.html#rebase-your-patch

Thanks for picking this up again. :smile:

sstok commented 10 years ago

Closed in favor of #39, thanks for the work done so far.

d00001 commented 10 years ago

Good job. Sorry I didn't get a chance to finish this. You do a great job with this bundle.

sstok commented 10 years ago

Thanks (sorry for the late reply :) )