ฉันมีตัวจัดการการส่งไปยังแบบฟอร์มผู้ใช้
มันเปลี่ยนเส้นทางผู้ใช้ไปยังหน้าเฉพาะ
ใช้ Symfony\Component\HttpFoundation\RedirectResponse เป็น RedirectResponse
/**
 * @ไฟล์
 * ขอโมดูลหลักสำหรับโมดูล EHESS Propositions 3
 *
 *@ดีซีจี
 * ไฟล์นี้ไม่จำเป็นอีกต่อไปใน Drupal 8
 * @ดู https://www.drupal.org/node/2217931
 */
ฟังก์ชัน ehess_propositions_3_form_alter(&$form, &$form_state, $form_id) {
  ถ้า ($form_id == 'user_form') {
    foreach (array_keys($form['actions']) as $action) {
      ถ้า (isset($form['actions'][$action]['#type']) && $form['actions'][$action]['#type'] === 'submit') {
        $form['actions'][$action]['#submit'][] = '_ehess_propositions_3_user_profile_submit';
      }
    }
  }
}
ฟังก์ชัน _ehess_propositions_3_user_profile_submit($form, &$form_state) {
  $response = ใหม่ RedirectResponse('/admin/content/reglement/');
  $response->send();
}
แต่ปัญหาคือตัวจัดการการส่งถูกไล่ออกทั้งการอัปเดตผู้ใช้และการลบผู้ใช้ ที่บล็อกการเปลี่ยนเส้นทางไปยังหน้า "ยืนยันการลบ" ของผู้ใช้
มีการดำเนินการเฉพาะเพื่ออัปเดตแบบฟอร์มผู้ใช้เท่านั้นและไม่ลบผู้ใช้หรือไม่