$nickname_arg = $this->trimmed('nickname');
$id = intval($this->arg('id'));
if ($id) {
- $this->group = User_group::staticGet('id', $id);
+ $this->group = User_group::getKV('id', $id);
} else if ($nickname_arg) {
$nickname = common_canonical_nickname($nickname_arg);
return false;
}
- $local = Local_group::staticGet('nickname', $nickname);
+ $local = Local_group::getKV('nickname', $nickname);
if (!$local) {
// TRANS: Client error displayed when trying to join a non-local group.
return false;
}
- $this->group = User_group::staticGet('id', $local->group_id);
+ $this->group = User_group::getKV('id', $local->group_id);
} else {
// TRANS: Client error displayed when trying to join a group without providing a group name or group ID.
$this->clientError(_('No nickname or ID.'), 404);
try {
$result = $cur->joinGroup($this->group);
} catch (Exception $e) {
+ common_log(LOG_ERR, sprintf("Couldn't join user %s to group %s: '%s'",
+ $cur->nickname,
+ $this->group->nickname,
+ $e->getMessage()));
// TRANS: Server error displayed when joining a group failed in the database.
// TRANS: %1$s is the joining user's nickname, $2$s is the group nickname for which the join failed.
$this->serverError(sprintf(_('Could not join user %1$s to group %2$s.'),
}
$form->show();
$this->elementEnd('body');
- $this->elementEnd('html');
+ $this->endHTML();
} else {
common_redirect(common_local_url('groupmembers', array('nickname' =>
$this->group->nickname)),