Skip to content

Commit 03b4464

Browse files
author
robin.kluth
committed
1.1.13
* Provide domainName for searched users * Catch permission error for file_put_content
1 parent ff2802a commit 03b4464

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/LdapAuth.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public function login($username, $password, $domainKey)
122122

123123
if (!file_exists($ldaprcfile)) {
124124
// Try to create the file
125-
if (!file_put_contents($ldaprcfile, 'TLS_REQCERT allow')) {
125+
if (!@file_put_contents($ldaprcfile, 'TLS_REQCERT allow')) {
126126
Yii::error('Cannot create required .ldaprc control file!');
127127
return false;
128128
}
@@ -264,7 +264,7 @@ public function searchUser($searchFor, $attributes = "", $searchFilter = "", $au
264264
continue;
265265
}
266266
$sid = self::SIDtoString($entry['objectsid'][0]);
267-
array_push($return, array_merge(['sid' => $sid, 'dn' => $entry['dn'], 'domainKey' => $i], self::handleEntry($entry)));
267+
array_push($return, array_merge(['sid' => $sid, 'dn' => $entry['dn'], 'domainKey' => $i, 'domainName' => $this->domains[$i]['name']], self::handleEntry($entry)));
268268
}
269269
}
270270
$i++;

0 commit comments

Comments
 (0)