| @@ 37-53 (lines=17) @@ | ||
| 34 | ||
| 35 | $db_prefix = elgg_get_config('dbprefix'); |
|
| 36 | ||
| 37 | if ($user_entity) { |
|
| 38 | // check if user exists and has friends or groups |
|
| 39 | $hasfriends = $user_entity->getFriends(); |
|
| 40 | $hasgroups = $user_entity->getGroups(); |
|
| 41 | if ($hasgroups) { |
|
| 42 | // loop through group guids |
|
| 43 | $groups = $user_entity->getGroups(array('limit'=>0)); |
|
| 44 | $group_guids = array(); |
|
| 45 | foreach ($groups as $group) { |
|
| 46 | $group_guids[] = $group->getGUID(); |
|
| 47 | } |
|
| 48 | } |
|
| 49 | } else { |
|
| 50 | $hasfriends = false; |
|
| 51 | $hasgroups = false; |
|
| 52 | $group_guids = array(); |
|
| 53 | } |
|
| 54 | ||
| 55 | $actionTypes = array('comment', 'create', 'join', 'update', 'friend', 'reply'); |
|
| 56 | ||
| @@ 707-723 (lines=17) @@ | ||
| 704 | ||
| 705 | $db_prefix = elgg_get_config('dbprefix'); |
|
| 706 | ||
| 707 | if ($user_entity) { |
|
| 708 | // check if user exists and has friends or groups |
|
| 709 | $hasfriends = $user_entity->getFriends(); |
|
| 710 | $hasgroups = $user_entity->getGroups(); |
|
| 711 | if ($hasgroups) { |
|
| 712 | // loop through group guids |
|
| 713 | $groups = $user_entity->getGroups(array('limit'=>0)); |
|
| 714 | $group_guids = array(); |
|
| 715 | foreach ($groups as $group) { |
|
| 716 | $group_guids[] = $group->getGUID(); |
|
| 717 | } |
|
| 718 | } |
|
| 719 | } else { |
|
| 720 | $hasfriends = false; |
|
| 721 | $hasgroups = false; |
|
| 722 | $group_guids = array(); |
|
| 723 | } |
|
| 724 | ||
| 725 | $actionTypes = array('comment', 'create', 'join', 'update', 'friend', 'reply'); |
|
| 726 | ||