public function onInitIPAddress($event)
    {
        $sender = $event->sender;
        $request = $sender->getWebRequest();
        if ($sender->enableIP && $request && empty($sender->ipAddress)) {
            $sender->ipAddress = $request->userIP;
        }
    }
public function onInitIPAddress($event)
    {
        $sender = $event->sender;
        $request = $sender->getWebRequest();
        if ($sender->enableIP && $request && empty($sender->ipAddress)) {
            $sender->ipAddress = $request->userIP;
        }
    }
public function onInitIPAddress ( $ event ) { $ sender = $ event -> sender ; $ request = $ sender -> getWebRequest ( ) ; if ( $ sender -> enableIP && $ request && empty ( $ sender -> ipAddress ) ) { $ sender -> ipAddress = $ request -> userIP ; } }
Initialize IP Attributes.
This method is ONLY used for being triggered by event. DO NOT call,
override or modify it directly, unless you know the consequences.
@param ModelEvent $event
Initialize IP Attributes . This method is ONLY used for being triggered by event . DO NOT call override or modify it directly unless you know the consequences .