Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
fusiondirectory
fusiondirectory-orchestrator
Commits
e2d9cd00
Verified
Commit
e2d9cd00
authored
11 months ago
by
dockx thibault
Browse files
Options
Download
Patches
Plain Diff
delete obsolete class
parent
b00323db
dev
61-orchestrator-lifecycle-array-supann-is-analyzed-with-static-numbering
63-orchestrator-mail-controller-format-of-mail-text-and-signature-are-not-utf8-usage-of-accents-is
70-create-unitests-for-orchestrator
73-orchestrator-create-a-librabry-in-core-orchestrator
78-redesign-audit-class
79-redesign-mail
80-redesign-notifications-class
81-redesign-reminders-class
82-redesign-lifecycle-class
89-orchestrator-lifecycle-adaptation-to-regex-supann-selection
main
revert-55863b23
1.1
2 merge requests
!72
Releasing Fusiondirectory Orchestrator 1.1
,
!53
Resolve "[Orchestrator] - Create a possible plugin endpoints, allowing new endpoints developed to be considered as plugin base."
Pipeline
#28432
failed with stages
in 1 minute and 10 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
plugins/getUsers.php
+0
-43
plugins/getUsers.php
with
0 additions
and
43 deletions
+0
-43
plugins/getUsers.php
deleted
100644 → 0
+
0
−
43
View file @
b00323db
<?php
class
getUsers
extends
TaskGateway
{
protected
$ds
;
public
function
__construct
()
{
$ldap_connect
=
new
Ldap
(
$_ENV
[
"FD_LDAP_MASTER_URL"
],
$_ENV
[
"LDAP_ADMIN"
],
$_ENV
[
"LDAP_PWD"
]);
$this
->
ds
=
$ldap_connect
->
getConnection
();
}
public
function
processEndPoint
()
{
return
$this
->
customLdapSearch
(
"(&(objectClass=person))"
,
[
'cn'
]);
}
// This custom ldap search should be within parent as simplified version of what already exists. Refactor required.
public
function
customLdapSearch
(
string
$filter
=
''
,
array
$attrs
=
[],
string
$dn
=
NULL
):
array
{
$result
=
[];
if
(
empty
(
$dn
))
{
$dn
=
$_ENV
[
"LDAP_BASE"
];
}
try
{
$sr
=
ldap_search
(
$this
->
ds
,
$dn
,
$filter
,
$attrs
);
$info
=
ldap_get_entries
(
$this
->
ds
,
$sr
);
}
catch
(
Exception
$e
)
{
// build array for return response
$result
=
[
json_encode
([
"Ldap Error"
=>
"
$e
"
])];
// string returned
}
// Verify if the above ldap search succeeded.
if
(
!
empty
(
$info
)
&&
is_array
(
$info
)
&&
$info
[
"count"
]
>=
1
)
{
return
$info
;
}
return
$result
;
}
}
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets