Skip to content

Commit 6da7378

Browse files
author
Sabina Talipova
committed
MNT Remove TODO comments
1 parent df528fe commit 6da7378

File tree

3 files changed

+2
-13
lines changed

3 files changed

+2
-13
lines changed

src/Iterators/LDAPIterator.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,7 @@ private function fetchPagedResult(): bool
121121
$resultResource = ldap_search($resource, $baseDn ?? '', $this->getFilter() ?? '');
122122
}
123123
if (! is_resource($resultResource)) {
124-
/*
125-
* @TODO better exception msg
126-
*/
127-
throw new \Exception('ldap_search returned something wrong...' . ldap_error($resource));
124+
throw new \Exception('ldap_search returned a non-resource type value' . ldap_error($resource));
128125
}
129126

130127
$entries = ldap_get_entries($resource, $resultResource);

src/Model/LDAPGateway.php

-3
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,6 @@ public function getUserByUsername($username, $baseDn = null, $scope = Ldap::SEAR
364364
$filter = sprintf('(&(objectClass=user)(samaccountname=%s))', AbstractFilter::escapeValue($username));
365365
break;
366366
case Ldap::ACCTNAME_FORM_BACKSLASH: // backslash style usernames, e.g. FOO\alice
367-
// @todo Not supported yet!
368367
throw new Exception('Backslash style not supported in LDAPGateway::getUserByUsername()!');
369368
break;
370369
case Ldap::ACCTNAME_FORM_PRINCIPAL: // principal style usernames, e.g. [email protected]
@@ -374,7 +373,6 @@ public function getUserByUsername($username, $baseDn = null, $scope = Ldap::SEAR
374373
);
375374
break;
376375
case Ldap::ACCTNAME_FORM_DN: // distinguished name, e.g. CN=someone,DC=example,DC=co,DC=nz
377-
// @todo Not supported yet!
378376
throw new Exception('DN style not supported in LDAPGateway::getUserByUsername()!');
379377
break;
380378
default: // default to principal style
@@ -406,7 +404,6 @@ public function getCanonicalUsername($data)
406404
}
407405
return $data['samaccountname'];
408406
case Ldap::ACCTNAME_FORM_BACKSLASH: // backslash style usernames, e.g. FOO\alice
409-
// @todo Not supported yet!
410407
throw new Exception('Backslash style not supported in LDAPGateway::getUsernameByEmail()!');
411408
case Ldap::ACCTNAME_FORM_PRINCIPAL: // principal style usernames, e.g. [email protected]
412409
if (empty($data['userprincipalname'])) {

src/Services/LDAPService.php

+1-6
Original file line numberDiff line numberDiff line change
@@ -974,9 +974,7 @@ public function updateLDAPFromMember(Member $member)
974974
];
975975
foreach ($member->config()->ldap_field_mappings as $attribute => $field) {
976976
$relationClass = $member->getRelationClass($field);
977-
if ($relationClass) {
978-
// todo no support for writing back relations yet.
979-
} else {
977+
if (!$relationClass) {
980978
$attributes[$attribute] = $member->$field;
981979
}
982980
}
@@ -1102,9 +1100,6 @@ public function addLDAPUserToGroup($userDn, $groupDn)
11021100
* Change a members password on the AD. Works with ActiveDirectory compatible services that saves the
11031101
* password in the `unicodePwd` attribute.
11041102
*
1105-
* @todo Use the Laminas\Ldap\Attribute::setPassword functionality to create a password in
1106-
* an abstract way, so it works on other LDAP directories, not just Active Directory.
1107-
*
11081103
* Ensure that the LDAP bind:ed user can change passwords and that the connection is secure.
11091104
*
11101105
* @param Member $member

0 commit comments

Comments
 (0)