Questions tagged «admin-user»


4
在Magento 2.0中以编程方式创建管理员用户
在Magento 1.9中添加新的管理员用户很简单 <?php require_once('app/Mage.php'); umask(0); Mage::app(); $user = Mage::getModel('admin/user') ->setData(array( 'username' => 'admin', 'firstname' => 'admin', 'lastname' => 'admin', 'email' => 'me@hackme.com', 'password' => 'hacker@123', 'is_active' => 1 )) ->save(); $user->setRoleIds(array(1)) ->setRoleUserId($user->getUserId()) ->saveRelations(); echo "User has been created successfully!"; ?> 但是如何在Magento 2.0中添加管理员用户?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.