public function regIp(EventInterface $event) { $request = $event->getServiceLocator()->get('request'); $userEntity = $event->getUserEntity(); $userEntity->setRegIp($request->getServer('REMOTE_ADDR')); }