$uid = $this->network->get_user_by_username($_POST['username'], FALSE, TRUE); $r = $p->set_to_user($uid); if (!$r) { echo '<result><status>ERROR</status><message>' . $this->lang('pf_msgerr_user') . $this->lang('pf_msgerr_user2') . '</message></result>'; exit; } } elseif (isset($_POST['groupname'])) { $gid = $this->network->get_group_by_name($_POST['groupname'], FALSE, TRUE); $r = $p->set_group_id($gid); if (!$r) { echo '<result><status>ERROR</status><message>' . $this->lang('pf_msgerr_group') . '</message></result>'; exit; } } if (isset($_POST['at_link']) && $_POST['at_link'] == "-1") { $a = $p->get_attached(); $tmp = $post_temp->get_attached(); $a['link'] = $tmp['link']; $p->set_attached($a); } if (isset($_POST['at_image']) && $_POST['at_image'] == "-1") { $a = $p->get_attached(); $tmp = $post_temp->get_attached(); $a['image'] = $tmp['image']; $p->set_attached($a); } if (isset($_POST['at_videoembed']) && $_POST['at_videoembed'] == "-1") { $a = $p->get_attached(); $tmp = $post_temp->get_attached(); $a['videoembed'] = $tmp['videoembed']; $p->set_attached($a);