@@ 2263-2274 (lines=12) @@ | ||
2260 | * @return bool |
|
2261 | * @deprecated 1.9 Use \ElggGroup::join instead. |
|
2262 | */ |
|
2263 | function join_group($group_guid, $user_guid) { |
|
2264 | elgg_deprecated_notice('join_group was deprecated in favor of \ElggGroup::join', '1.9'); |
|
2265 | ||
2266 | $group = get_entity($group_guid); |
|
2267 | $user = get_entity($user_guid); |
|
2268 | ||
2269 | if ($group instanceof \ElggGroup && $user instanceof \ElggUser) { |
|
2270 | return $group->join($user); |
|
2271 | } |
|
2272 | ||
2273 | return false; |
|
2274 | } |
|
2275 | ||
2276 | /** |
|
2277 | * Remove a user from a group. |
|
@@ 2285-2295 (lines=11) @@ | ||
2282 | * @return bool Whether the user was removed from the group. |
|
2283 | * @deprecated 1.9 Use \ElggGroup::leave() |
|
2284 | */ |
|
2285 | function leave_group($group_guid, $user_guid) { |
|
2286 | elgg_deprecated_notice('leave_group was deprecated in favor of \ElggGroup::leave', '1.9'); |
|
2287 | $group = get_entity($group_guid); |
|
2288 | $user = get_entity($user_guid); |
|
2289 | ||
2290 | if ($group instanceof \ElggGroup && $user instanceof \ElggUser) { |
|
2291 | return $group->leave($user); |
|
2292 | } |
|
2293 | ||
2294 | return false; |
|
2295 | } |
|
2296 | ||
2297 | /** |
|
2298 | * Create paragraphs from text with line spacing |