From 0a7431a0ff7ea648e515c3e8457894d2127bab6d Mon Sep 17 00:00:00 2001 From: Andrew O'Neil Date: Tue, 10 Mar 2009 21:43:20 +0000 Subject: [PATCH] BUGFIX: #1450 - Passwords should be obscured when adding a member in a MemberTableField git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@72798 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- code/MemberTableField.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/code/MemberTableField.php b/code/MemberTableField.php index 8351c132..505dc53b 100755 --- a/code/MemberTableField.php +++ b/code/MemberTableField.php @@ -255,7 +255,12 @@ class MemberTableField extends ComplexTableField { function AddRecordForm() { $fields = new FieldSet(); foreach($this->FieldList() as $fieldName => $fieldTitle) { - $fields->push(new TextField($fieldName)); + // If we're adding the set password field, we want to hide the text from any peeping eyes + if($fieldName == 'SetPassword') { + $fields->push(new PasswordField($fieldName)); + } else { + $fields->push(new TextField($fieldName)); + } } $fields->push(new HiddenField('ctf[ID]', null, $this->group->ID)); @@ -386,4 +391,4 @@ class MemberTableField_ItemRequest extends ComplexTableField_ItemRequest { } -?> \ No newline at end of file +?>