File tree Expand file tree Collapse file tree 3 files changed +10
-13
lines changed
app/code/Magento/Integration/Model/ResourceModel/Oauth Expand file tree Collapse file tree 3 files changed +10
-13
lines changed Original file line number Diff line number Diff line change @@ -37,8 +37,8 @@ protected function _construct()
37
37
public function _afterDelete (\Magento \Framework \Model \AbstractModel $ object )
38
38
{
39
39
$ connection = $ this ->getConnection ();
40
- $ connection ->delete ($ this ->getTable ('oauth_nonce ' ), ['consumer_id ' => $ object ->getId ()]);
41
- $ connection ->delete ($ this ->getTable ('oauth_token ' ), ['consumer_id ' => $ object ->getId ()]);
40
+ $ connection ->delete ($ this ->getTable ('oauth_nonce ' ), ['consumer_id = ? ' => ( int ) $ object ->getId ()]);
41
+ $ connection ->delete ($ this ->getTable ('oauth_token ' ), ['consumer_id = ? ' => ( int ) $ object ->getId ()]);
42
42
return parent ::_afterDelete ($ object );
43
43
}
44
44
Original file line number Diff line number Diff line change @@ -110,12 +110,8 @@ public function loadFixtures()
110
110
foreach ($ files as $ file ) {
111
111
$ file = basename ($ file , '.php ' );
112
112
/** @var \Magento\Setup\Fixtures\Fixture $fixture */
113
- $ fixture = $ this ->objectManager ->create (
114
- 'Magento\Setup\Fixtures ' . '\\' . $ file ,
115
- [
116
- 'fixtureModel ' => $ this
117
- ]
118
- );
113
+ $ type = 'Magento\Setup\Fixtures ' . '\\' . $ file ;
114
+ $ fixture = new $ type ($ this );
119
115
$ this ->fixtures [$ fixture ->getPriority ()] = $ fixture ;
120
116
}
121
117
Original file line number Diff line number Diff line change @@ -123,15 +123,16 @@ public function authPreDispatch($event)
123
123
/** @var \Magento\Framework\App\State $adminAppState */
124
124
$ adminAppState = $ objectManager ->get ('Magento\Framework\App\State ' );
125
125
$ adminAppState ->setAreaCode (\Magento \Framework \App \Area::AREA_ADMIN );
126
- $ objectManager ->create (
127
- 'Magento\Backend\Model\Auth\Session ' ,
126
+ /** @var \Magento\Backend\Model\Auth\Session $adminSession */
127
+ $ adminSession = $ objectManager ->create (
128
+ \Magento \Backend \Model \Auth \Session::class,
128
129
[
129
- 'sessionConfig ' => $ objectManager ->get (' Magento\Backend\Model\Session\AdminConfig ' ),
130
+ 'sessionConfig ' => $ objectManager ->get (\ Magento \Backend \Model \Session \AdminConfig::class ),
130
131
'appState ' => $ adminAppState
131
132
]
132
133
);
133
-
134
- if (! $ objectManager -> get ( ' Magento\Backend\Model\Auth ' )-> isLoggedIn ()) {
134
+ if (! $ objectManager -> get (\ Magento \ Backend \ Model \Auth::class)-> isLoggedIn ()) {
135
+ $ adminSession -> expireSessionCookie ();
135
136
$ response = $ event ->getResponse ();
136
137
$ response ->getHeaders ()->addHeaderLine ('Location ' , 'index.php/session/unlogin ' );
137
138
$ response ->setStatusCode (302 );
You can’t perform that action at this time.
0 commit comments