Skip to content
Permalink
Browse files

Fix social invitations

  • Loading branch information...
AngelFQC committed Jul 25, 2016
1 parent f6f091c commit f58be9b55cf991b2795055af5254b646f2b5ec4c
Showing with 7 additions and 7 deletions.
  1. +7 −7 main/social/invitations.php
@@ -19,11 +19,13 @@
$interbreadcrumb[] = array ('url' =>'profile.php','name' => get_lang('SocialNetwork'));
$interbreadcrumb[] = array ('url' =>'#','name' => get_lang('Invitations'));
$userGroupModel = new UserGroup();
if (is_array($_GET) && count($_GET) > 0) {
foreach ($_GET as $key => $value) {
switch ($key) {
case 'accept':
$useRole = UserGroup::get_user_group_role(api_get_user_id(), $value);
$useRole = $userGroupModel->get_user_group_role(api_get_user_id(), $value);
if (in_array(
$useRole,
@@ -32,7 +34,7 @@
GROUP_USER_PERMISSION_PENDING_INVITATION
)
)) {
UserGroup::update_user_role(api_get_user_id(), $value, GROUP_USER_PERMISSION_READER);
$userGroupModel->update_user_role(api_get_user_id(), $value, GROUP_USER_PERMISSION_READER);
Display::addFlash(
Display::return_message(get_lang('UserIsSubscribedToThisGroup'), 'success')
@@ -66,7 +68,7 @@
exit;
break;
case 'deny':
UserGroup::delete_user_rel_group(api_get_user_id(), $value);
$userGroupModel->delete_user_rel_group(api_get_user_id(), $value);
Display::addFlash(
Display::return_message(get_lang('GroupInvitationWasDeny'))
@@ -78,8 +80,6 @@
}
}
$userGroup = new UserGroup();
$content = null;
// Block Menu Social
@@ -90,7 +90,7 @@
$user_id = api_get_user_id();
$list_get_invitation = SocialManager::get_list_invitation_of_friends_by_user_id($user_id);
$list_get_invitation_sent = SocialManager::get_list_invitation_sent_by_user_id($user_id);
$pending_invitations = $userGroup->get_groups_by_user(
$pending_invitations = $userGroupModel->get_groups_by_user(
$user_id,
GROUP_USER_PERMISSION_PENDING_INVITATION
);
@@ -195,7 +195,7 @@
$new_invitation = array();
$waitingInvitation = '';
foreach ($pending_invitations as $invitation) {
$picture = $userGroup->get_picture_group(
$picture = $userGroupModel->get_picture_group(
$invitation['id'],
$invitation['picture'],
80

0 comments on commit f58be9b

Please sign in to comment.
You can’t perform that action at this time.