|
@@ 240-248 (lines=9) @@
|
| 237 |
|
} |
| 238 |
|
|
| 239 |
|
// Check the new password |
| 240 |
|
if (empty($data['NewPassword1'])) { |
| 241 |
|
$this->form->sessionMessage( |
| 242 |
|
_t( |
| 243 |
|
'SilverStripe\\Security\\Member.EMPTYNEWPASSWORD', |
| 244 |
|
"The new password can't be empty, please try again" |
| 245 |
|
), |
| 246 |
|
"bad" |
| 247 |
|
); |
| 248 |
|
|
| 249 |
|
// redirect back to the form, instead of using redirectBack() which could send the user elsewhere. |
| 250 |
|
return $this->redirectBackToForm(); |
| 251 |
|
} |
|
@@ 254-261 (lines=8) @@
|
| 251 |
|
} |
| 252 |
|
|
| 253 |
|
// Fail if passwords do not match |
| 254 |
|
if ($data['NewPassword1'] !== $data['NewPassword2']) { |
| 255 |
|
$this->form->sessionMessage( |
| 256 |
|
_t( |
| 257 |
|
'SilverStripe\\Security\\Member.ERRORNEWPASSWORD', |
| 258 |
|
"You have entered your new password differently, try again" |
| 259 |
|
), |
| 260 |
|
"bad" |
| 261 |
|
); |
| 262 |
|
|
| 263 |
|
// redirect back to the form, instead of using redirectBack() which could send the user elsewhere. |
| 264 |
|
return $this->redirectBackToForm(); |