mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
To include OldPassword field only when the curruentUser exists and (no autologinhash given or the autologinhash is not right), since there a lots of cases that the currentUser exists (like a temperary member ) but he hasn't got password yet.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@46304 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
de30b37795
commit
f141fbe5ad
@ -26,7 +26,7 @@ class ChangePasswordForm extends Form {
|
||||
function __construct($controller, $name, $fields = null, $actions = null) {
|
||||
if(!$fields) {
|
||||
$fields = new FieldSet();
|
||||
if(Member::currentUser()) {
|
||||
if(Member::currentUser()&&(!isset($_REQUEST['h']) ||!Member::autoLoginHash($_REQUEST['h']))) {
|
||||
$fields->push(new EncryptField("OldPassword",_t('Member.YOUROLDPASSWORD', "Your old password")));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user