$which = $parameters['nick'];
} elseif (local_user() && isset($parameters['profile']) && DI::args()->get(2) == 'view') {
// view infos about a known profile (needs a login)
- $which = $a->user['nickname'];
+ $which = $a->getUserNickname();
} else {
System::jsonError(403, 'Authentication required');
}