File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
app/code/Magento/Customer/Model Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -56,18 +56,23 @@ public function saveAuth($customerId)
56
56
{
57
57
$ customerSecure = $ this ->customerRegistry ->retrieveSecureData ($ customerId );
58
58
59
+ $ this ->customerResourceModel ->load ($ this ->customerModel , $ customerId );
60
+ $ currentLockExpiresVal = $ this ->customerModel ->getData ('lock_expires ' );
61
+ $ newLockExpiresVal = $ customerSecure ->getData ('lock_expires ' );
62
+
59
63
$ this ->customerResourceModel ->getConnection ()->update (
60
64
$ this ->customerResourceModel ->getTable ('customer_entity ' ),
61
65
[
62
66
'failures_num ' => $ customerSecure ->getData ('failures_num ' ),
63
67
'first_failure ' => $ customerSecure ->getData ('first_failure ' ),
64
- 'lock_expires ' => $ customerSecure -> getData ( ' lock_expires ' ) ,
68
+ 'lock_expires ' => $ newLockExpiresVal ,
65
69
],
66
70
$ this ->customerResourceModel ->getConnection ()->quoteInto ('entity_id = ? ' , $ customerId )
67
71
);
68
72
69
- $ this ->customerResourceModel ->load ($ this ->customerModel , $ customerId );
70
- $ this ->customerModel ->reindex ();
73
+ if ($ currentLockExpiresVal !== $ newLockExpiresVal ) {
74
+ $ this ->customerModel ->reindex ();
75
+ }
71
76
72
77
return $ this ;
73
78
}
You can’t perform that action at this time.
0 commit comments