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
52c35aff
Verified
Commit
52c35aff
authored
6 months ago
by
dockx thibault
Browse files
Options
Download
Patches
Plain Diff
Feat(Orchestrator) - url is being sent properly
save commit - timetamp to unix.
parent
24b99059
dev
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
main
revert-55863b23
1.1
2 merge requests
!72
Releasing Fusiondirectory Orchestrator 1.1
,
!61
Resolve "[Orchestrator] - New endpoint for userReminder allowing to send notification to use with token to extend their account longevity"
Pipeline
#30335
failed with stages
in 1 minute and 19 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
plugins/tasks/Reminder.php
+6
-2
plugins/tasks/Reminder.php
with
6 additions
and
2 deletions
+6
-2
plugins/tasks/Reminder.php
+
6
−
2
View file @
52c35aff
...
...
@@ -215,10 +215,14 @@ class Reminder implements EndpointInterface
* @return bool
* @throws Exception
*/
private
function
saveTokenInLdap
(
string
$userDN
,
string
$token
,
int
$
timeStamp
):
bool
private
function
saveTokenInLdap
(
string
$userDN
,
string
$token
,
int
$
days
):
bool
{
$result
=
FALSE
;
$currentTimestamp
=
time
();
// Calculate the future timestamp by adding days to the current timestamp (We actually adds number of seconds).
$futureTimestamp
=
$currentTimestamp
+
(
$days
*
24
*
60
*
60
);
preg_match
(
'/uid=([^,]+),ou=/'
,
$userDN
,
$matches
);
$uid
=
$matches
[
1
];
$dn
=
'cn='
.
$uid
.
','
.
'ou=tokens'
.
','
.
$_ENV
[
"LDAP_BASE"
];
...
...
@@ -227,7 +231,7 @@ class Reminder implements EndpointInterface
$ldap_entry
[
"fdTokenUserDN"
]
=
$userDN
;
$ldap_entry
[
"fdTokenType"
]
=
'reminder'
;
$ldap_entry
[
"fdToken"
]
=
$token
;
$ldap_entry
[
"fdTokenTimestamp"
]
=
$
t
ime
S
tamp
;
$ldap_entry
[
"fdTokenTimestamp"
]
=
$
futureT
ime
s
tamp
;
$ldap_entry
[
"cn"
]
=
$uid
;
// set the dn for the token, only take what's between "uid=" and ",ou="
...
...
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