joingroup.php

Summary
joingroup.php
JoinGroupJoin a group
JoingroupActionJoin a group
preparePrepare to run
handleHandle the request

JoinGroup

Join a group

postActiv

the micro-blogging software

Copyright

Copyright © 2016-2017, Maiyannah Bishop

Derived from code copyright various sources

  • GNU Social © 2013-2016, Free Software Foundation, Inc
  • StatusNet © 2008-2012, StatusNet, Inc

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program.  If not, see http://www.gnu.org/licenses/.

https://www.gnu.org/licenses/agpl.html

About

Join a group

PHP version

Tested with PHP 7.0

File Authors

Web

JoingroupAction

Join a group

This is the action for joining a group.  It works more or less like the subscribe action for users.

Variables

  • group: group being joined
Summary
preparePrepare to run
handleHandle the request

prepare

protected function prepare(array $args = array())

Prepare to run

Error states

  • returns a client error if not logged in
  • returns a client error if the group does not exist
  • returns a client error if the group id or name is not provided
  • returns a client error if the user has been blocked

Returns

  • boolean true if successful

handle

protected function handle()

Handle the request

On POST, add the current user to the group

Returns

  • void
protected function prepare(array $args = array())
Prepare to run
protected function handle()
Handle the request