Added user name history beginnings.

This commit is contained in:
flash 2025-02-09 01:32:25 +00:00
parent 7f7e644069
commit cc37b7cad3
6 changed files with 207 additions and 1 deletions
public-legacy

View file

@ -26,6 +26,12 @@ $viewerId = $viewingAsGuest ? '0' : $viewerInfo->id;
try {
$userInfo = $msz->usersCtx->getUserInfo($userId, 'profile');
} catch(RuntimeException $ex) {
$userId = $msz->usersCtx->namesHistory->resolvePastUserName($userId);
if($userId !== null) {
header(sprintf('Location: %s', $msz->urls->format('user-profile', ['user' => $userId])));
return;
}
http_response_code(404);
Template::render('profile.index', [
'profile_is_guest' => $viewingAsGuest,