->withHeader('Location', $this->router->pathFor('slash'));
}
+ $post = $request->getParsedBody();
$deps = array(
'picture' => true,
'groups' => true,
$real_requireds = array_diff(array_keys($required), array_keys($disabled));
// Validation
- if (isset($_POST[array_shift($real_requireds)])) {
+ if (isset($post[array_shift($real_requireds)])) {
// regular fields
- $valid = $member->check($_POST, $required, $disabled);
+ $valid = $member->check($post, $required, $disabled);
if ($valid !== true) {
$error_detected = array_merge($error_detected, $valid);
}
}
// send mail to member
- if (isset($args['self']) || isset($_POST['mail_confirm']) && $_POST['mail_confirm'] == '1') {
+ if (isset($args['self']) || isset($post['mail_confirm']) && $post['mail_confirm'] == '1') {
if ($this->preferences->pref_mail_method > GaletteMail::METHOD_DISABLED) {
if ($member->getEmail() == '' && !isset($args['self'])) {
$error_detected[] = _T("- You can't send a confirmation by email if the member hasn't got an address!");
$member->login
),
'password_adh' => custom_html_entity_decode(
- $_POST['mdp_adh']
+ $post['mdp_adh']
)
)
);
$mlang = $this->preferences->pref_lang;
- if (isset($_POST['pref_lang'])) {
- $mlang = $_POST['pref_lang'];
+ if (isset($post['pref_lang'])) {
+ $mlang = $post['pref_lang'];
}
$mtxt = $texts->getTexts(
(($new) ? 'sub' : 'accountedited'),
$managed_groups_adh = null;
//add/remove user from groups
- if (isset($_POST['groups_adh'])) {
- $groups_adh = $_POST['groups_adh'];
+ if (isset($post['groups_adh'])) {
+ $groups_adh = $post['groups_adh'];
}
$add_groups = Groups::addMemberToGroups(
$member,
}
//add/remove manager from groups
- if (isset($_POST['groups_managed_adh'])) {
- $managed_groups_adh = $_POST['groups_managed_adh'];
+ if (isset($post['groups_managed_adh'])) {
+ $managed_groups_adh = $post['groups_managed_adh'];
}
$add_groups = Groups::addMemberToGroups(
$member,
}
}
- if (isset($_POST['del_photo'])) {
+ if (isset($post['del_photo'])) {
if (!$member->picture->delete($member->id)) {
$error_detected[] = _T("Delete failed");
$str_adh = $member->id . ' (' . $member->sname . ' ' . ')';
}
if (count($error_detected) == 0) {
- if (!isset($_POST['id_adh']) && !$member->isDueFree() && !isset($args['self'])) {
+ if (!isset($post['id_adh']) && !$member->isDueFree() && !isset($args['self'])) {
return $response
->withStatus(301)
->withHeader(
$app->get(
__('/members/remove', 'routes'),
function ($request, $response) {
- $post = $request->getParsedBody();
-
$filters = $this->session->filter_members;
$data = [
if (trim($post['mailing_objet']) == '') {
$error_detected[] = _T("Please type an object for the message.");
} else {
- $mailing->subject = $_POST['mailing_objet'];
+ $mailing->subject = $post['mailing_objet'];
}
if (trim($post['mailing_corps']) == '') {
}
if (count($error_detected) == 0
- && !isset($_POST['mailing_reset'])
- && !isset($_POST['mailing_save'])
+ && !isset($post['mailing_reset'])
+ && !isset($post['mailing_save'])
) {
$mailing->current_step = Mailing::STEP_PREVIEW;
} else {
}
}
- if (isset($_POST['mailing_confirm']) && count($error_detected) == 0) {
+ if (isset($post['mailing_confirm']) && count($error_detected) == 0) {
$mailing->current_step = Mailing::STEP_SEND;
//ok... let's go for fun
$sent = $mailing->send();
$pdf->sheet_title = $post['sheet_title'];
}
if (isset($post['sheet_sub_title']) && trim($post['sheet_sub_title']) != '') {
- $pdf->sheet_sub_title = $_POST['sheet_sub_title'];
+ $pdf->sheet_sub_title = $post['sheet_sub_title'];
}
if (isset($post['sheet_date']) && trim($post['sheet_date']) != '') {
$dformat = __("Y-m-d");