File tree 2 files changed +7
-3
lines changed
app/code/Magento/Security 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ public function __construct(
35
35
}
36
36
37
37
/**
38
+ * Add warning message if other sessions terminated
39
+ *
38
40
* @param \Magento\Backend\Model\Auth $authModel
39
41
* @return void
40
42
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
@@ -43,11 +45,13 @@ public function afterLogin(\Magento\Backend\Model\Auth $authModel)
43
45
{
44
46
$ this ->sessionsManager ->processLogin ();
45
47
if ($ this ->sessionsManager ->getCurrentSession ()->isOtherSessionsTerminated ()) {
46
- $ this ->messageManager ->addWarning (__ ('All other open sessions for this account were terminated. ' ));
48
+ $ this ->messageManager ->addWarningMessage (__ ('All other open sessions for this account were terminated. ' ));
47
49
}
48
50
}
49
51
50
52
/**
53
+ * Handle logout process
54
+ *
51
55
* @param \Magento\Backend\Model\Auth $authModel
52
56
* @return void
53
57
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ protected function setUp(): void
64
64
65
65
$ this ->messageManager = $ this ->getMockForAbstractClass (
66
66
ManagerInterface::class,
67
- ['addWarning ' ],
67
+ ['addWarningMessage ' ],
68
68
'' ,
69
69
false
70
70
);
@@ -100,7 +100,7 @@ public function testAfterLogin()
100
100
->method ('isOtherSessionsTerminated ' )
101
101
->willReturn (true );
102
102
$ this ->messageManager ->expects ($ this ->once ())
103
- ->method ('addWarning ' )
103
+ ->method ('addWarningMessage ' )
104
104
->with ($ warningMessage );
105
105
106
106
$ this ->model ->afterLogin ($ this ->authMock );
You can’t perform that action at this time.
0 commit comments