From 7efd56e0dd84e3753ed34b92fa9b4122132f3a92 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Wed, 8 Oct 2008 04:17:52 +0000 Subject: [PATCH] Updated Member's getCMSFields() to consistently work with fields in a tab git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63837 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- security/Member.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/security/Member.php b/security/Member.php index dfa422292..d8a2b621c 100644 --- a/security/Member.php +++ b/security/Member.php @@ -910,7 +910,8 @@ class Member extends DataObject { * editing this member. */ public function getCMSFields() { - $fields = parent::scaffoldCMSFields(); + $mainFields = parent::scaffoldCMSFields(); + $fields = $mainFields->fieldByName("Root")->fieldByName("Main")->Children; $password = new ConfirmedPasswordField('Password', 'Password'); $password->setCanBeEmpty(true); @@ -960,9 +961,9 @@ class Member extends DataObject { // Members are displayed within group edit form in SecurityAdmin $fields->removeByName('Groups'); - $this->extend('updateCMSFields', $fields); + $this->extend('updateCMSFields', $mainFields); - return $fields; + return $mainFields; } function fieldLabels() {