Added user name history beginnings.
This commit is contained in:
parent
7f7e644069
commit
cc37b7cad3
6 changed files with 207 additions and 1 deletions
public-legacy
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue