kryptalabs/module-admin-password-cli
最新稳定版本:1.0.0
Composer 安装命令:
composer require kryptalabs/module-admin-password-cli
包简介
Magento 2 module for changing admin passwords via CLI with email verification
README 文档
README
A Magento 2 module that provides a secure CLI command to change admin user passwords. This module adds an extra layer of security by requiring email verification during the password change process.
Features
- 🔐 Secure password changing via CLI
- ✉️ Email verification to identify the correct admin user
- 🛡️ Input validation and error handling
- 📝 Detailed success/error messaging
Requirements
- Magento 2.3.x, 2.4.x
- PHP 7.4 or higher
Installation
Using Composer (Recommended)
composer require kryptalabs/module-admin-password-cli bin/magento module:enable Kryptalabs_AdminPasswordCli bin/magento setup:upgrade bin/magento cache:flush
Manual Installation
-
Create the following directory structure in your Magento installation:
app/code/Kryptalabs/AdminPasswordCli/ -
Download the module and copy the contents to the directory.
-
Enable the module:
bin/magento module:enable Kryptalabs_AdminPasswordCli bin/magento setup:upgrade bin/magento cache:flush
Usage
The module adds a new CLI command to change admin passwords:
bin/magento admin:user:password:change -u admin_username -p new_password -e admin_email
Command Options
| Option | Short | Required | Description |
|---|---|---|---|
| --username | -u | Yes | Admin username |
| --password | -p | Yes | New password |
| -e | Yes | Admin email address |
Examples
Change password for a specific admin user:
bin/magento admin:user:password:change --username adminuser --password newPassword123 --email admin@example.com
Using short options:
bin/magento admin:user:password:change -u adminuser -p newPassword123 -e admin@example.com
Error Handling
The command includes comprehensive error handling for various scenarios:
- Missing required options
- User not found
- Email mismatch
- Invalid password format
- Database errors
Security
- Passwords are securely hashed using Magento's native password hashing mechanism
- Email verification prevents unauthorized password changes
- CLI-only access adds an extra layer of security
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE.md file for details
Support
If you encounter any issues or have questions, please:
- Check the Issues page
- Submit a new issue if your problem isn't already listed
- For urgent support, contact [divyesh@kryptalabs.com]
Author
- GitHub: @divyesh-thadani
- Email: divyesh@kryptalabs.com
Changelog
1.0.0
- Initial release
- Basic password change functionality
- Email verification feature
- Error handling implementation
⭐ Found this useful? Show your support by giving this repository a star on GitHub!
统计信息
- 总下载量: 9
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-11-25