У нас вы можете посмотреть бесплатно How to update the customer password from backend in Magento 2 или скачать в максимальном доступном качестве, которое было загружено на ютуб. Для скачивания выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса savevideohd.ru
► Fanpage: / giaphugroupcom ► Subscribe to my channel: https://www.youtube.com/giaphugroupco... ► Skype: cuongnq87 ► The website link: https://www.giaphugroup.com/magento-2... #magento2 #magento #magento2tutorials Hi everybody, I am Cuong, Welcome back to my Magento 2 tutorials video series. In the previous lessons, I showed you: 1. How to login as a customer in Magento 2, if you don't watch this video yet, you can watch it here http://bit.ly/3SF9OiX 2. How to lock a customer account in Magento 2, if you don't watch this video yet, you can watch it here http://bit.ly/3KO0EPm Let's continue those series, today, I am going to show everybody a best practice, How to update a customer password from the backend in Magento 2. As we know, Magento supports a feature that allows the administrator to reset a password for a particular customer from the backend by clicking on the "Reset Password" text link. Then Magento will require the users to generate a new password by accessing the link sent in their email. However, a problem can arise if your customer wants you to send them a particular password for their account, or the customer account email temporarily can’t get emails. So how the customer can log into their customer account? In this tutorial video, I am going to show you the best codes to change a customer password from the backend in Magento 2. By default, Magento doesn't allow us to change the customer password directly on the customer form. So what will we do in this practice? 1. We will create a new module called PHPCuong_CustomerPassword 2. We will add a new customer attribute called "New Password". This customer attribute only can be used from the adminhtml_customer form. 3. We will display this new customer attribute to the customer form on the backend, when the administrator sets the new customer password to this field and press the save button, it will update the customer password and the customer can use that password then. Okay, let's go. Let's do this practice, you need to follow the steps by step: Step 1: Declaring a new module called PHPCuong_CustomerPassword Create the namespace PHPCuong in the path app\code. Create the module named CustomerPassword in the path app\code\PHPCuong. Create the file named registration.php in the path app\code\PHPCuong\CustomerPassword Create the file named module.xml in the path app\code\PHPCuong\CustomerPassword\etc End of step #1, I have been completed codes to create a new module called PHPCuong_CustomerPassword. Step 2: Adding a new customer attribute called "New Password" Create the new file named InstallData.php in the path app\code\PHPCuong\CustomerPassword\Setup Create the new file named Password.php in the path app\code\PHPCuong\CustomerPassword\Model\Attribute\Backend Step 3: Displaying the customer password field to the customer form on the backend. Create the new file named customer_form.xml in the path app\code\PHPCuong\CustomerPassword\view\adminhtml\ui_component Create the new file named password.html in the path app\code\PHPCuong\CustomerPassword\view\adminhtml\web\template\form\element Step 4: Test and See the results Run the following command line: php bin/magento setup:upgrade I used --keep-generated to not delete the folders in the generated, pub/static, var/view_preprocessed Go to the backend, try to edit a customer and update the customer password field and save. Go to the frontend, try to log into the customer account with the password just changed. Yeah, it works perfectly. We can hide the password by changing this Thank you for watching my video. If you have any questions about this practice please feel free to leave a comment below. Don't forget to like, comment, share and subscribe to my channel for getting the latest video. Please do not hesitate to contact me if you need me to join your Magento project. My rate is $25/hour in Magento 1 and $30/hour in Magento 2.