Fix PHP warning + show header when api_not_allowed()

pull/2487/head
jmontoyaa 7 years ago
parent 692fe5ccec
commit 35761b5c12
  1. 2
      main/social/group_invitation.php
  2. 16
      main/social/group_members.php

@ -185,7 +185,7 @@ if (is_array($members) && count($members) > 0) {
$member['image'] = '<img class="img-circle" src="'.$image.'" width="50px" height="50px" />';
}
$userList .= Display::return_sortable_grid(
$userList = Display::return_sortable_grid(
'invitation_profile',
array(),
$members,

@ -12,7 +12,7 @@ require_once __DIR__.'/../inc/global.inc.php';
api_block_anonymous_users();
if (api_get_setting('allow_social_tool') != 'true') {
api_not_allowed();
api_not_allowed(true);
}
$this_section = SECTION_SOCIAL;
@ -22,11 +22,11 @@ $user_role = '';
//todo @this validation could be in a function in group_portal_manager
if (empty($group_id)) {
api_not_allowed();
api_not_allowed(true);
} else {
$group_info = $userGroup->get($group_id);
if (empty($group_info)) {
api_not_allowed();
api_not_allowed(true);
}
$user_role = $userGroup->get_user_group_role(
api_get_user_id(),
@ -41,7 +41,7 @@ if (empty($group_id)) {
)
)
) {
api_not_allowed();
api_not_allowed(true);
}
}
@ -172,18 +172,18 @@ foreach ($users as $user) {
}
$userPicture = UserManager::getUserPicture($user['id']);
$user['image'] = '<img src="'.$userPicture.'" width="50px" height="50px" />';
$user['image'] = '<img src="'.$userPicture.'" width="50px" height="50px" />';
$new_member_list[] = $user;
}
if (count($new_member_list) > 0) {
$social_right_content .= Display::return_sortable_grid(
'list_members',
array(),
[],
$new_member_list,
array('hide_navigation' => true, 'per_page' => 100),
array(),
[],
false,
array(true, false, true, true, false, true, true)
array(true, false, true, false, false, true, true)
);
}

Loading…
Cancel
Save