Skip to content

Commit e4ec0e2

Browse files
committed
revert merge changes (#22833: Short-term admin accounts)
1 parent 3c608fd commit e4ec0e2

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

app/code/Magento/User/Model/ResourceModel/User/Collection.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ protected function _construct()
2727
* Collection Init Select
2828
*
2929
* @return $this
30-
* @since 101.1.0
3130
*/
3231
protected function _initSelect()
3332
{

app/code/Magento/User/Model/User.php

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,12 @@ class User extends AbstractModel implements StorageInterface, UserInterface
115115
protected $_encryptor;
116116

117117
/**
118-
* @deprecated 101.1.0
118+
* @deprecated
119119
*/
120120
protected $_transportBuilder;
121121

122122
/**
123-
* @deprecated 101.1.0
123+
* @deprecated
124124
*/
125125
protected $_storeManager;
126126

@@ -140,7 +140,7 @@ class User extends AbstractModel implements StorageInterface, UserInterface
140140
private $notificator;
141141

142142
/**
143-
* @deprecated 101.1.0
143+
* @deprecated
144144
*/
145145
private $deploymentConfig;
146146

@@ -212,9 +212,14 @@ protected function _construct()
212212
* Removing dependencies and leaving only entity's properties.
213213
*
214214
* @return string[]
215+
*
216+
* @SuppressWarnings(PHPMD.SerializationAware)
217+
* @deprecated Do not use PHP serialization.
215218
*/
216219
public function __sleep()
217220
{
221+
trigger_error('Using PHP serialization is deprecated', E_USER_DEPRECATED);
222+
218223
$properties = parent::__sleep();
219224
return array_diff(
220225
$properties,
@@ -240,9 +245,14 @@ public function __sleep()
240245
* Restoring required objects after serialization.
241246
*
242247
* @return void
248+
*
249+
* @SuppressWarnings(PHPMD.SerializationAware)
250+
* @deprecated Do not use PHP serialization.
243251
*/
244252
public function __wakeup()
245253
{
254+
trigger_error('Using PHP serialization is deprecated', E_USER_DEPRECATED);
255+
246256
parent::__wakeup();
247257
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
248258
$this->serializer = $objectManager->get(Json::class);
@@ -406,6 +416,10 @@ public function getRoles()
406416
*/
407417
public function getRole()
408418
{
419+
if ($this->getData('extracted_role')) {
420+
$this->_role = $this->getData('extracted_role');
421+
$this->unsetData('extracted_role');
422+
}
409423
if (null === $this->_role) {
410424
$this->_role = $this->_roleFactory->create();
411425
$roles = $this->getRoles();
@@ -441,7 +455,7 @@ public function roleUserExists()
441455
/**
442456
* Send email with reset password confirmation link.
443457
*
444-
* @deprecated 101.1.0
458+
* @deprecated
445459
* @see NotificatorInterface::sendForgotPassword()
446460
*
447461
* @return $this
@@ -521,7 +535,7 @@ protected function createChangesDescriptionString()
521535
* @throws NotificationExceptionInterface
522536
* @return $this
523537
* @since 100.1.0
524-
* @deprecated 101.1.0
538+
* @deprecated
525539
* @see NotificatorInterface::sendUpdated()
526540
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
527541
*/

0 commit comments

Comments
 (0)