Joindin 441: Redirecting the I'm attending button

Would someone be able to review my changes to Controller/Event.php, I'm not convinced that the way I'm doing the redirecting is the best way. If anyone can suggest something better that would be great.

There is an if-statement in the removed code that gives me the impression that event may be false, null, 0, array() or ''. In your code $event is passed to a constructor that requires $event to be an object of class EventEntity and will throw a fatal error if the event is something other than that.