Permalink
Browse files

Fix Duo

  • Loading branch information...
1 parent 839038b commit 201ca38f4433a6a355931508a7df52ca954dfd34 @cdujeu cdujeu committed Jun 28, 2016
Showing with 5 additions and 2 deletions.
  1. +5 −2 core/src/plugins/authfront.duosecurity/DuoSecurityFrontend.php
@@ -53,12 +53,15 @@ function tryToLogUser(\Psr\Http\Message\ServerRequestInterface &$request, \Psr\H
}
- $test = $this->logUserFromLoginAction($request, $response, $isLast);
- if(!$test){
+ $testResponse = $this->logUserFromLoginAction($request, $response, $isLast);
+ if(!$testResponse){
return false;
}
/** @var ContextInterface $ctx */
$ctx = $request->getAttribute("ctx");
+ if(!$ctx->hasUser()){
+ return false;
+ }
$uObject = $ctx->getUser();
$duoActive = $uObject->getMergedRole()->filterParameterValue("authfront.duosecurity", "DUO_AUTH_ACTIVE", AJXP_REPO_SCOPE_ALL, false);
if(!$duoActive){

0 comments on commit 201ca38

Please sign in to comment.