@amitRosenberg, this code won't give you any name, I guess that you wanted to do something like: ($scope->getEvent()->getObject()->getkuser() && $scope->getEvent()->getObject()->getkuser() instanceof kuser) ? $scope->getEvent()->getObject()->getkuser()->getScreenName() : ''