Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
User.php
Go to the documentation of this file.
1 <?php
7 
9 {
15  const ADMIN_RESOURCE = 'Magento_User::acl_users';
16 
22  protected $_coreRegistry;
23 
29  protected $_userFactory;
30 
36  public function __construct(
37  \Magento\Backend\App\Action\Context $context,
38  \Magento\Framework\Registry $coreRegistry,
39  \Magento\User\Model\UserFactory $userFactory
40  ) {
41  parent::__construct($context);
42  $this->_coreRegistry = $coreRegistry;
43  $this->_userFactory = $userFactory;
44  }
45 
49  protected function _initAction()
50  {
51  $this->_view->loadLayout();
52  $this->_setActiveMenu(
53  'Magento_User::system_acl_users'
54  )->_addBreadcrumb(
55  __('System'),
56  __('System')
57  )->_addBreadcrumb(
58  __('Permissions'),
59  __('Permissions')
60  )->_addBreadcrumb(
61  __('Users'),
62  __('Users')
63  );
64  return $this;
65  }
66 
73  protected function _getAdminUserData(array $data)
74  {
75  if (isset($data['password']) && $data['password'] === '') {
76  unset($data['password']);
77  }
78  if (!isset($data['password'])
79  && isset($data['password_confirmation'])
80  && $data['password_confirmation'] === ''
81  ) {
82  unset($data['password_confirmation']);
83  }
84  return $data;
85  }
86 }
__()
Definition: __.php:13
__construct(\Magento\Backend\App\Action\Context $context, \Magento\Framework\Registry $coreRegistry, \Magento\User\Model\UserFactory $userFactory)
Definition: User.php:36