@@ -115,12 +115,12 @@ class User extends AbstractModel implements StorageInterface, UserInterface
115
115
protected $ _encryptor ;
116
116
117
117
/**
118
- * @deprecated 101.1.0
118
+ * @deprecated
119
119
*/
120
120
protected $ _transportBuilder ;
121
121
122
122
/**
123
- * @deprecated 101.1.0
123
+ * @deprecated
124
124
*/
125
125
protected $ _storeManager ;
126
126
@@ -140,7 +140,7 @@ class User extends AbstractModel implements StorageInterface, UserInterface
140
140
private $ notificator ;
141
141
142
142
/**
143
- * @deprecated 101.1.0
143
+ * @deprecated
144
144
*/
145
145
private $ deploymentConfig ;
146
146
@@ -212,9 +212,14 @@ protected function _construct()
212
212
* Removing dependencies and leaving only entity's properties.
213
213
*
214
214
* @return string[]
215
+ *
216
+ * @SuppressWarnings(PHPMD.SerializationAware)
217
+ * @deprecated Do not use PHP serialization.
215
218
*/
216
219
public function __sleep ()
217
220
{
221
+ trigger_error ('Using PHP serialization is deprecated ' , E_USER_DEPRECATED );
222
+
218
223
$ properties = parent ::__sleep ();
219
224
return array_diff (
220
225
$ properties ,
@@ -240,9 +245,14 @@ public function __sleep()
240
245
* Restoring required objects after serialization.
241
246
*
242
247
* @return void
248
+ *
249
+ * @SuppressWarnings(PHPMD.SerializationAware)
250
+ * @deprecated Do not use PHP serialization.
243
251
*/
244
252
public function __wakeup ()
245
253
{
254
+ trigger_error ('Using PHP serialization is deprecated ' , E_USER_DEPRECATED );
255
+
246
256
parent ::__wakeup ();
247
257
$ objectManager = \Magento \Framework \App \ObjectManager::getInstance ();
248
258
$ this ->serializer = $ objectManager ->get (Json::class);
@@ -406,6 +416,10 @@ public function getRoles()
406
416
*/
407
417
public function getRole ()
408
418
{
419
+ if ($ this ->getData ('extracted_role ' )) {
420
+ $ this ->_role = $ this ->getData ('extracted_role ' );
421
+ $ this ->unsetData ('extracted_role ' );
422
+ }
409
423
if (null === $ this ->_role ) {
410
424
$ this ->_role = $ this ->_roleFactory ->create ();
411
425
$ roles = $ this ->getRoles ();
@@ -441,7 +455,7 @@ public function roleUserExists()
441
455
/**
442
456
* Send email with reset password confirmation link.
443
457
*
444
- * @deprecated 101.1.0
458
+ * @deprecated
445
459
* @see NotificatorInterface::sendForgotPassword()
446
460
*
447
461
* @return $this
@@ -521,7 +535,7 @@ protected function createChangesDescriptionString()
521
535
* @throws NotificationExceptionInterface
522
536
* @return $this
523
537
* @since 100.1.0
524
- * @deprecated 101.1.0
538
+ * @deprecated
525
539
* @see NotificatorInterface::sendUpdated()
526
540
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
527
541
*/
0 commit comments