Skip to content
Snippets Groups Projects
Commit d0602151 authored by lukasmatusiewicz's avatar lukasmatusiewicz
Browse files

Update PrivacyIDEA.php

parent f694415e
No related branches found
No related tags found
No related merge requests found
......@@ -352,14 +352,14 @@ class PrivacyIDEA
if (!empty($response['result']['value']))
{
// Ensure an admin account
if (!empty($response['result']['value']["token"]))
if (!empty($response['result']['value']['token']))
{
if ($this->findRecursive($response, "role") != 'admin')
if ($this->findRecursive($response, 'role') != 'admin')
{
$this->debugLog("Auth token was of a user without admin role.");
return "";
}
return $response['result']['value']["token"];
return $response['result']['value']['token'];
}
}
......@@ -385,8 +385,10 @@ class PrivacyIDEA
RecursiveIteratorIterator::SELF_FIRST
);
foreach ($recursive as $key => $value) {
if ($key === $needle) {
foreach ($recursive as $key => $value)
{
if ($key === $needle)
{
return $value;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment