mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
#1850 - Changing default admin password after installation does not work (merged from branches/2.2.0@45907, r45451)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@46101 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
f44171bf41
commit
84ae974db4
@ -1054,18 +1054,6 @@ class Member_ProfileForm extends Form {
|
||||
$SQL_data = Convert::raw2sql($data);
|
||||
|
||||
$member = DataObject::get_by_id("Member", $SQL_data['ID']);
|
||||
if($member->canEdit()) {
|
||||
if(!empty($SQL_data['Password']) && !empty($SQL_data['ConfirmPassword'])) {
|
||||
if($SQL_data['Password']==$SQL_data['ConfirmPassword']) {
|
||||
$member->Password=$SQL_data['Password'];
|
||||
} else {
|
||||
$form->addErrorMessage("Blurb","Both passwords need to match. Please try again.","bad");
|
||||
Director::redirectBack();
|
||||
}
|
||||
} else {
|
||||
$form->dataFieldByName("Password")->setValue($member->Password);
|
||||
}
|
||||
}
|
||||
|
||||
if($SQL_data['Locale'] != $member->Locale) {
|
||||
$form->addErrorMessage("Generic", _t('Member.REFRESHLANG'),"good");
|
||||
|
Loading…
Reference in New Issue
Block a user