Skip to content
Snippets Groups Projects
Unverified Commit defac0ff authored by Morris Jobke's avatar Morris Jobke
Browse files

Fixes hex2bin() in LDAP


Untangles the two if-else clauses into a more readable format.

Signed-off-by: default avatarMorris Jobke <hey@morrisjobke.de>
parent fc30e7a6
No related branches found
No related tags found
No related merge requests found
...@@ -1253,11 +1253,13 @@ class Access extends LDAPUtility implements IUserTools { ...@@ -1253,11 +1253,13 @@ class Access extends LDAPUtility implements IUserTools {
unset($item[$key]['count']); unset($item[$key]['count']);
} }
if($key !== 'dn') { if($key !== 'dn') {
$selection[$i][$key] = $this->resemblesDN($key) ? if($this->resemblesDN($key)) {
$this->helper->sanitizeDN($item[$key]) $selection[$i][$key] = $this->helper->sanitizeDN($item[$key]);
: $key === 'objectguid' || $key === 'guid' ? } else if($key === 'objectguid' || $key === 'guid') {
$selection[$i][$key] = $this->convertObjectGUID2Str($item[$key]) $selection[$i][$key] = [$this->convertObjectGUID2Str($item[$key][0])];
: $item[$key]; } else {
$selection[$i][$key] = $item[$key];
}
} else { } else {
$selection[$i][$key] = [$this->helper->sanitizeDN($item[$key])]; $selection[$i][$key] = [$this->helper->sanitizeDN($item[$key])];
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment