$registerVia3rdParty = $eventParameters['registerVia3rdParty'];
$this->additionalFields['languageID'] = $this->languageID;
- if (LOG_IP_ADDRESS) $this->additionalFields['registrationIpAddress'] = WCF::getSession()->ipAddress;
+ if (LOG_IP_ADDRESS) $this->additionalFields['registrationIpAddress'] = UserUtil::getIpAddress();
// generate activation code
$addDefaultGroups = true;
$isAjax = isset($_SERVER['HTTP_X_REQUESTED_WITH']) && ($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest');
if (defined('BLACKLIST_IP_ADDRESSES') && BLACKLIST_IP_ADDRESSES != '') {
- if (!StringUtil::executeWordFilter(UserUtil::convertIPv6To4(self::getSession()->ipAddress), BLACKLIST_IP_ADDRESSES)) {
+ if (!StringUtil::executeWordFilter(UserUtil::convertIPv6To4(UserUtil::getIpAddress()), BLACKLIST_IP_ADDRESSES)) {
if ($isAjax) {
throw new AJAXException(self::getLanguage()->getDynamicVariable('wcf.ajax.error.permissionDenied'), AJAXException::INSUFFICIENT_PERMISSIONS);
}
throw new PermissionDeniedException();
}
}
- else if (!StringUtil::executeWordFilter(self::getSession()->ipAddress, BLACKLIST_IP_ADDRESSES)) {
+ else if (!StringUtil::executeWordFilter(UserUtil::getIpAddress(), BLACKLIST_IP_ADDRESSES)) {
if ($isAjax) {
throw new AJAXException(self::getLanguage()->getDynamicVariable('wcf.ajax.error.permissionDenied'), AJAXException::INSUFFICIENT_PERMISSIONS);
}
}
}
if (defined('BLACKLIST_HOSTNAMES') && BLACKLIST_HOSTNAMES != '') {
- if (!StringUtil::executeWordFilter(@gethostbyaddr(self::getSession()->ipAddress), BLACKLIST_HOSTNAMES)) {
+ if (!StringUtil::executeWordFilter(@gethostbyaddr(UserUtil::getIpAddress()), BLACKLIST_HOSTNAMES)) {
if ($isAjax) {
throw new AJAXException(self::getLanguage()->getDynamicVariable('wcf.ajax.error.permissionDenied'), AJAXException::INSUFFICIENT_PERMISSIONS);
}
'sessionID' => WCF::getSession()->sessionID,
'userID' => WCF::getUser()->userID,
'ipAddress' => UserUtil::getIpAddress(),
- 'hostname' => @gethostbyaddr(WCF::getSession()->ipAddress),
+ 'hostname' => @gethostbyaddr(UserUtil::getIpAddress()),
'userAgent' => WCF::getSession()->userAgent,
'time' => TIME_NOW,
'lastActivityTime' => TIME_NOW