{event name='userDataRow1'}
</ul>
- {if $user->canViewOnlineStatus() && $user->getLastActivityTime()}
+ {hascontent}
<ul class="inlineList commaSeparated">
- <li>{lang}wcf.user.usersOnline.lastActivity{/lang}: {@$user->getLastActivityTime()|time}</li>
- {if $user->getCurrentLocation()}<li>{@$user->getCurrentLocation()}</li>{/if}
+ {content}
+ {if $user->canViewOnlineStatus() && $user->getLastActivityTime()}
+ <li>{lang}wcf.user.usersOnline.lastActivity{/lang}: {@$user->getLastActivityTime()|time}</li>
+ {if $user->getCurrentLocation()}<li>{@$user->getCurrentLocation()}</li>{/if}
+ {/if}
+ {if $__wcf->session->getPermission('admin.user.canViewIpAddress') && $user->registrationIpAddress}
+ <li>{lang}wcf.user.registrationIpAddress{/lang}: <span class="userRegistrationIpAddress">{$user->getRegistrationIpAddress()}</span></li>
+ {/if}
+ {/content}
</ul>
- {/if}
+ {/hascontent}
<dl class="plain inlineDataList">
{include file='userInformationStatistics'}
<th class="columnTitle columnUsername{if $sortField == 'username'} active {@$sortOrder}{/if}" colspan="2"><a href="{link controller='UserList' id=$searchID}action={@$encodedAction}&pageNo={@$pageNo}&sortField=username&sortOrder={if $sortField == 'username' && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}wcf.user.username{/lang}</a></th>
{foreach from=$columnHeads key=column item=columnLanguageVariable}
- <th class="column{$column|ucfirst}{if $columnStyling[$column]|isset} {$columnStyling[$column]}{/if}{if $sortField == $column} active {@$sortOrder}{/if}"><a href="{link controller='UserList' id=$searchID}action={@$encodedAction}&pageNo={@$pageNo}&sortField={$column}&sortOrder={if $sortField == $column && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}{$columnLanguageVariable}{/lang}</a></th>
+ <th class="column{$column|ucfirst}{if $columnStyling[$column]|isset} {$columnStyling[$column]}{/if}{if $sortField == $column} active {@$sortOrder}{/if}"{if $column === 'registrationDate'} colspan="2"{/if}><a href="{link controller='UserList' id=$searchID}action={@$encodedAction}&pageNo={@$pageNo}&sortField={$column}&sortOrder={if $sortField == $column && $sortOrder == 'ASC'}DESC{else}ASC{/if}{/link}">{lang}{$columnLanguageVariable}{/lang}</a></th>
{/foreach}
{event name='columnHeads'}
</td>
{foreach from=$columnHeads key=column item=columnLanguageVariable}
+ {if $column === 'registrationDate'}
+ <td class="columnDate columnRegistrationIpAddress">
+ {if $__wcf->session->getPermission('admin.user.canViewIpAddress') && $user->registrationIpAddress}
+ <span class="jsTooltip" title="{lang}wcf.user.registrationIpAddress{/lang}">{$user->getRegistrationIpAddress()}</span>
+ {/if}
+ </td>
+ {/if}
<td class="column{$column|ucfirst}{if $columnStyling[$column]|isset} {$columnStyling[$column]}{/if}">{if $columnValues[$user->userID][$column]|isset}{@$columnValues[$user->userID][$column]}{/if}</td>
{/foreach}
use wcf\system\WCF;
use wcf\util\CryptoUtil;
use wcf\util\PasswordUtil;
+use wcf\util\UserUtil;
/**
* Represents a user.
'twitter' => false
];
}
+
+ /**
+ * Returns the registration ip address, attempts to convert to IPv4.
+ *
+ * @return string
+ */
+ public function getRegistrationIpAddress() {
+ if ($this->registrationIpAddress) {
+ return UserUtil::convertIPv6To4($this->registrationIpAddress);
+ }
+
+ return '';
+ }
}
<item name="wcf.user.logout.sure"><![CDATA[{if LANGUAGE_USE_INFORMAL_VARIANT}Willst du dich{else}Wollen Sie sich{/if} wirklich abmelden?]]></item>
<item name="wcf.user.password"><![CDATA[Kennwort]]></item>
<item name="wcf.user.registrationDate"><![CDATA[Registrierungsdatum]]></item>
+ <item name="wcf.user.registrationIpAddress"><![CDATA[Registrierungs-IP-Adresse]]></item>
<item name="wcf.user.visibleLanguages"><![CDATA[Inhaltssprachen]]></item>
<item name="wcf.user.visibleLanguages.description"><![CDATA[Zeigt Inhalte in den ausgewählten Sprachen an]]></item>
<item name="wcf.user.unknownUser"><![CDATA[Dieser Benutzer existiert nicht oder wurde gelöscht.]]></item>
<item name="wcf.user.logout.sure"><![CDATA[Do you really want to log out?]]></item>
<item name="wcf.user.password"><![CDATA[Password]]></item>
<item name="wcf.user.registrationDate"><![CDATA[Registration Date]]></item>
+ <item name="wcf.user.registrationIpAddress"><![CDATA[Registration IP Address]]></item>
<item name="wcf.user.visibleLanguages"><![CDATA[Multilingualism]]></item>
<item name="wcf.user.visibleLanguages.description"><![CDATA[Limits visibility to content associated with the selected languages.]]></item>
<item name="wcf.user.unknownUser"><![CDATA[This user does not exist or has been deleted.]]></item>