Merge pull request #3135 from spacecabbie/patch-1

Added check to see if extra mail fields where set before remove.
pull/3178/head
Julio Montoya 6 years ago committed by GitHub
commit 6bf2228c74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 17
      custompages/registration-dist.php

@ -12,13 +12,18 @@ require_once api_get_path(SYS_PATH).'main/inc/global.inc.php';
require_once __DIR__.'/language.php';
/**
* Removes some unwanted elementend of the form object.
* 03-26-2020 Added check if element exist.
*/
$content['form']->removeElement('extra_mail_notify_invitation');
$content['form']->removeElement('extra_mail_notify_message');
$content['form']->removeElement('extra_mail_notify_group_message');
$content['form']->removeElement('official_code');
$content['form']->removeElement('phone');
$content['form']->removeElement('submit');
if (isset($content['form']->_elementIndex['extra_mail_notify_invitation'])) {
$content['form']->removeElement('extra_mail_notify_invitation');
}
if (isset($content['form']->_elementIndex['extra_mail_notify_message'])) {
$content['form']->removeElement('extra_mail_notify_message');
}
if (isset($content['form']->_elementIndex['extra_mail_notify_group_message'])) {
$content['form']->removeElement('extra_mail_notify_group_message');
}
if (isset($content['form']->_elementIndex['status'])) {
$content['form']->removeElement('status');
$content['form']->removeElement('status');

Loading…
Cancel
Save