mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
more solid ID-detection in php()
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@47584 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
b5aaa9b1e2
commit
1589785b18
@ -1255,11 +1255,14 @@ class Member_Validator extends RequiredFields {
|
|||||||
|
|
||||||
// if we are in a complex table field popup, use ctf[childID], else use
|
// if we are in a complex table field popup, use ctf[childID], else use
|
||||||
// ID
|
// ID
|
||||||
$id = (isset($_REQUEST['ctf']['childID']))
|
if(isset($_REQUEST['ctf']['childID']))
|
||||||
? $_REQUEST['ctf']['childID']
|
$id = $_REQUEST['ctf']['childID'];
|
||||||
: $_REQUEST['ID'];
|
elseif(isset($_REQUEST['ID']))
|
||||||
|
$id = $_REQUEST['ID'];
|
||||||
|
else
|
||||||
|
$id = null;
|
||||||
|
|
||||||
if(is_object($member) && $member->ID != $id) {
|
if($id && is_object($member) && $member->ID != $id) {
|
||||||
$emailField = $this->form->dataFieldByName('Email');
|
$emailField = $this->form->dataFieldByName('Email');
|
||||||
$this->validationError($emailField->id(),
|
$this->validationError($emailField->id(),
|
||||||
_t('Member.VALIDATIONMEMBEREXISTS', "There already exists a member with this email"),
|
_t('Member.VALIDATIONMEMBEREXISTS', "There already exists a member with this email"),
|
||||||
|
Loading…
Reference in New Issue
Block a user