Checks if the types of the passed arguments in a function/method call are compatible.
1 | <?php |
||
2 | /** |
||
3 | * Remove member from access collection |
||
4 | */ |
||
5 | |||
6 | $collection_id = (int) get_input('collection_id'); |
||
7 | $collection = get_access_collection($collection_id); |
||
8 | $user_guid = get_input('user_guid'); |
||
9 | |||
10 | if (!$collection instanceof ElggAccessCollection || !$collection->canEdit()) { |
||
11 | return elgg_error_response(elgg_echo('friends:collections:remove_member:permissions')); |
||
12 | } |
||
13 | |||
14 | if ($collection->removeMember($user_guid)) { |
||
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
15 | $data = [ |
||
16 | 'collection' => $collection, |
||
17 | ]; |
||
18 | return elgg_ok_response($data, elgg_echo('friends:collections:remove_member:success')); |
||
19 | } else { |
||
20 | return elgg_error_response(elgg_echo('friends:collections:remove_member:fail')); |
||
21 | } |
||
22 |