23 private $moduleDataSetup;
30 \
Magento\Framework\Setup\ModuleDataSetupInterface $moduleDataSetup
32 $this->moduleDataSetup = $moduleDataSetup;
40 $this->moduleDataSetup->getConnection()->startSetup();
42 $this->moduleDataSetup->getConnection()->endSetup();
72 private function upgradeHash()
74 $connection = $this->moduleDataSetup->getConnection();
75 $customerEntityTable = $this->moduleDataSetup->getTable(
'admin_user');
79 [
'user_id',
'password']
87 if (strlen($hash) === 32) {
89 }
elseif (strlen($hash) === 64) {
93 $bind = [
'password' => $newHash];
94 $where = [
'user_id = ?' => (int)
$customer[
'user_id']];
95 $connection->update($customerEntityTable, $bind, $where);
elseif(isset( $params[ 'redirect_parent']))
const HASH_VERSION_SHA256
__construct(\Magento\Framework\Setup\ModuleDataSetupInterface $moduleDataSetup)