expiration date placeholder for jobs

This commit is contained in:
Roland Gruber 2016-01-16 18:46:58 +00:00
parent b627bc7088
commit edef026b24
5 changed files with 21 additions and 3 deletions

View File

@ -8,6 +8,7 @@ March 2016 5.3
-> autoload errors in tree view
- LAM Pro:
-> Support for LDAP views based on nsview object class
-> Password notification jobs support to print expiration date in email
15.12.2015 5.2

View File

@ -2076,6 +2076,11 @@ mysql> GRANT ALL PRIVILEGES ON lam_cron.* TO 'lam_cron'@'localhost';
<para>You can enter LDAP attributes as wildcards in the form
@@ATTRIBUTE_NAME@@. E.g. to add the user's common name use "@@cn@@".
For the common name it would be "@@cn@@".</para>
<para>There are also two special wildcards for the expiration date.
@@EXPIRE_DATE_DDMMYYYY@@ will print the date as e.g. "31.12.2016".
@@EXPIRE_DATE_YYYYMMDD@@ will print the date as e.g.
"2016-12-31".</para>
</section>
<section>
@ -2160,6 +2165,11 @@ mysql&gt; GRANT ALL PRIVILEGES ON lam_cron.* TO 'lam_cron'@'localhost';
<para>You can enter LDAP attributes as wildcards in the form
@@ATTRIBUTE_NAME@@. E.g. to add the user's common name use "@@cn@@".
For the common name it would be "@@cn@@".</para>
<para>There are also two special wildcards for the expiration date.
@@EXPIRE_DATE_DDMMYYYY@@ will print the date as e.g. "31.12.2016".
@@EXPIRE_DATE_YYYYMMDD@@ will print the date as e.g.
"2016-12-31".</para>
</section>
<section>
@ -2235,6 +2245,11 @@ mysql&gt; GRANT ALL PRIVILEGES ON lam_cron.* TO 'lam_cron'@'localhost';
<para>You can enter LDAP attributes as wildcards in the form
@@ATTRIBUTE_NAME@@. E.g. to add the user's common name use "@@cn@@".
For the common name it would be "@@cn@@".</para>
<para>There are also two special wildcards for the expiration date.
@@EXPIRE_DATE_DDMMYYYY@@ will print the date as e.g. "31.12.2016".
@@EXPIRE_DATE_YYYYMMDD@@ will print the date as e.g.
"2016-12-31".</para>
</section>
</section>

View File

@ -2,7 +2,7 @@
$Id$
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
Copyright (C) 2009 Roland Gruber
Copyright (C) 2009 - 2016 Roland Gruber
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -85,6 +85,8 @@ div.mediaobject img {
h1 { color:#253aa3; }
h2 { color:#000080; font-size:13pt; }
h3 { color:#000080; }
h4 { color:#000080; }
div.nogrid table {
border-width:2px;

View File

@ -885,7 +885,7 @@ if (interface_exists('\LAM\JOB\Job', false)) {
return;
}
// send email
$success = $this->sendMail($options, $jobID, $user);
$success = $this->sendMail($options, $jobID, $user, $expireTime);
// update DB if mail was sent successfully
if ($success) {
$this->setDBLastPwdChangeTime($jobID, $pdo, $user['dn'], $user['shadowlastchange'][0]);

View File

@ -3300,7 +3300,7 @@ if (interface_exists('\LAM\JOB\Job', false)) {
return;
}
// send email
$success = $this->sendMail($options, $jobID, $user);
$success = $this->sendMail($options, $jobID, $user, $expireTime);
// update DB if mail was sent successfully
if ($success) {
$this->setDBLastPwdChangeTime($jobID, $pdo, $user['dn'], $user['pwdlastset'][0]);