File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -22,9 +22,10 @@ public function __construct($container)
22
22
public function onSecurityInteractiveLogin (InteractiveLoginEvent $ event )
23
23
{
24
24
$ user = $ event ->getAuthenticationToken ()->getUser ();
25
- if (!empty ($ user ->getLatch ())) {
25
+ $ latchValue = $ user ->getLatch ();
26
+ if ($ latchValue != '' ) {
26
27
$ appId = $ this ->container ->getParameter ('latch_app_id ' );
27
- $ appSecret = $ this ->container ->getParameter ('latch_app_secret ' );
28
+ $ appSecret = $ this ->container ->getParameter ('latch_app_secret ' );
28
29
$ api = new Latch ($ appId , $ appSecret );
29
30
$ statusResponse = $ api ->status ($ user ->getLatch ());
30
31
if ($ statusResponse ->getError () === null ) {
@@ -35,7 +36,7 @@ public function onSecurityInteractiveLogin(InteractiveLoginEvent $event)
35
36
} else {
36
37
$ this ->container ->get ('security.context ' )->setToken (null );
37
38
$ this ->container ->get ('request ' )->getSession ()->invalidate ();
38
- }
39
- }
39
+ }
40
+ }
40
41
}
41
42
}
You can’t perform that action at this time.
0 commit comments