Permalink
Browse files

BUG Fixing deprecated usage of dataFieldByName() in Member_Validator

  • Loading branch information...
1 parent 99ae715 commit dcf5d217ad942828beadf3ea7aea92ea7926bcc9 @halkyon halkyon committed Sep 6, 2012
Showing with 1 addition and 3 deletions.
  1. +1 −3 security/Member.php
View
@@ -1489,10 +1489,8 @@ function dosave($data, $form) {
if(!isset($data['ID']) || $data['ID'] != Member::currentUserID()) {
return $this->controller->redirectBack();
}
-
$SQL_data = Convert::raw2sql($data);
$member = DataObject::get_by_id("Member", $SQL_data['ID']);
-
if($SQL_data['Locale'] != $member->Locale) {
$form->addErrorMessage("Generic", _t('Member.REFRESHLANG'),"good");
}
@@ -1596,7 +1594,7 @@ function php($data) {
}
if($id && is_object($member) && $member->ID != $id) {
- $uniqueField = $this->form->dataFieldByName($identifierField);
+ $uniqueField = $this->form->Fields()->dataFieldByName($identifierField);
$this->validationError(
$uniqueField->id(),
_t(

0 comments on commit dcf5d21

Please sign in to comment.