Skip to content

Commit 71bff79

Browse files
author
Joan He
committed
MAGETWO-38635: Security - password management 2
1 parent 4d9ebeb commit 71bff79

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

app/code/Magento/Customer/Setup/UpgradeData.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface
9393

9494
if (version_compare($context->getVersion(), '2.0.7', '<')) {
9595
$this->upgradeVersionTwoZeroSeven($customerSetup);
96+
$this->upgradeCustomerPasswordResetlinkExpirationPeriodConfig($setup);
9697
}
9798

9899
$indexer = $this->indexerRegistry->get(Customer::CUSTOMER_GRID_INDEXER_ID);
@@ -459,4 +460,19 @@ private function upgradeVersionTwoZeroSeven($customerSetup)
459460
]
460461
);
461462
}
463+
464+
/**
465+
* @param ModuleDataSetupInterface $setup
466+
* @return void
467+
*/
468+
private function upgradeCustomerPasswordResetlinkExpirationPeriodConfig($setup)
469+
{
470+
$configTable = $setup->getTable('core_config_data');
471+
472+
$setup->getConnection()->update(
473+
$configTable,
474+
['value' => new \Zend_Db_Expr('value*24')],
475+
['path = ?' => \Magento\Customer\Model\Customer::XML_PATH_CUSTOMER_RESET_PASSWORD_LINK_EXPIRATION_PERIOD]
476+
);
477+
}
462478
}

0 commit comments

Comments
 (0)