- $user = DBA::selectFirst('user', ['uid'], ['nickname' => $nickname, 'account_removed' => false]);
-
- if (!DBA::isResult($user) && empty($profiledata)) {
- Logger::log('profile error: ' . DI::args()->getQueryString(), Logger::DEBUG);
- return;
- }
-
- if (count($profiledata) > 0) {
- // Ensure to have a "nickname" field
- if (empty($profiledata['nickname']) && !empty($profiledata['nick'])) {
- $profiledata['nickname'] = $profiledata['nick'];
- }
-
- // Add profile data to sidebar
- DI::page()['aside'] .= self::sidebar($a, $profiledata, true, $show_connect);
-
- if (!DBA::isResult($user)) {
- return;
- }
- }
-
- $profile = !empty($user['uid']) ? User::getOwnerDataById($user['uid'], false) : [];
-
- if (empty($profile) && empty($profiledata)) {