fix: [user view] server issues fixed

pull/5417/head
iglocska 2019-11-20 16:17:18 +01:00
parent 965b00d164
commit 8438db4565
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
2 changed files with 5 additions and 4 deletions

View File

@ -483,7 +483,8 @@ class UsersController extends AppController
'conditions' => array('User.id' => $id),
'contain' => array(
'UserSetting',
'Role'
'Role',
'Organisation'
)
));
if (empty($user)) {
@ -516,9 +517,9 @@ class UsersController extends AppController
), $this->response->type());
return $this->RestResponse->viewData(array('User' => $user['User']), $this->response->type());
} else {
$temp = $this->User->data['User']['invited_by'];
$user2 = $this->User->find('first', array('conditions' => array('User.id' => $user['User']['invited_by']), 'recursive' => -1));
$this->set('id', $id);
$this->set('user2', $this->User->read(null, $temp));
$this->set('user2', $user2);
}
}

View File

@ -41,7 +41,7 @@ $buttonModifyStatus = $mayModify ? 'button_on':'button_off';
'key' => __('Authkey'),
'html' => $authkey_data
);
$table_data[] = array('key' => __('Invited By'), 'value' => $user2['User']['email']);
$table_data[] = array('key' => __('Invited By'), 'value' => empty($user2['User']['email']) ? 'N/A' : $user2['User']['email']);
$org_admin_data = array();
foreach ($user['User']['orgAdmins'] as $orgAdminId => $orgAdminEmail) {
$org_admin_data[] = sprintf(