exit(1);
}
-require_once INSTALLDIR . '/lib/apiauth.php';
-
/**
* Show (or delete) a single membership event as an ActivityStreams entry
*
$profileId = $this->trimmed('profile');
- $this->_profile = Profile::staticGet('id', $profileId);
+ $this->_profile = Profile::getKV('id', $profileId);
if (empty($this->_profile)) {
// TRANS: Client exception.
$groupId = $this->trimmed('group');
- $this->_group = User_group::staticGet('id', $groupId);
+ $this->_group = User_group::getKV('id', $groupId);
if (empty($this->_group)) {
// TRANS: Client exception thrown when referencing a non-existing group.
" membership."), 403);
}
- if (Event::handle('StartLeaveGroup', array($this->_group, $this->auth_user))) {
- Group_member::leave($this->_group->id, $this->auth_user->id);
- Event::handle('EndLeaveGroup', array($this->_group, $this->auth_user));
- }
+ $this->auth_user->leaveGroup($this->_group);
return;
}