Changeset 4019 in subversion
- Timestamp:
- Sep 30, 2010 3:02:52 AM (3 years ago)
- Location:
- trunk/plugins/password
- Files:
-
- 4 edited
-
config.inc.php.dist (modified) (1 diff)
-
drivers/ldap.php (modified) (3 diffs)
-
drivers/ldap_simple.php (modified) (4 diffs)
-
package.xml (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/password/config.inc.php.dist
r3954 r4019 188 188 $rcmail_config['password_ldap_force_replace'] = true; 189 189 190 // LDAP Password Last Change Date 191 // Some places use an attribute to store the date of the last password change 192 // The date is meassured in "days since epoch" (an integer value) 193 // Whenever the password is changed, the attribute will be updated if set (e.g. shadowLastChange) 194 $rcmail_config['password_ldap_lchattr'] = ''; 195 190 196 191 197 // DirectAdmin Driver options -
trunk/plugins/password/drivers/ldap.php
r3775 r4019 81 81 return PASSWORD_CONNECT_ERROR; 82 82 } 83 84 // Updating PasswordLastChange Attribute if desired 85 if ($lchattr = $rcmail->config->get('password_ldap_lchattr')) { 86 $current_day = (int)(time() / 86400); 87 if (!$userEntry->replace(array($lchattr => $current_day), $force)) { 88 return PASSWORD_CONNECT_ERROR; 89 } 90 } 91 83 92 if (Net_LDAP2::isError($userEntry->update())) { 84 93 return PASSWORD_CONNECT_ERROR; … … 86 95 87 96 // All done, no error 88 return PASSWORD_SUCCESS; 97 return PASSWORD_SUCCESS; 89 98 } 90 99 … … 270 279 return $str; 271 280 } 272 273 ?> -
trunk/plugins/password/drivers/ldap_simple.php
r3850 r4019 1 1 <?php 2 2 3 /** 3 4 * Simple LDAP Password Driver … … 13 14 { 14 15 $rcmail = rcmail::get_instance(); 15 16 16 17 /* Connect */ 17 18 if (!$ds = ldap_connect($rcmail->config->get('password_ldap_host'), $rcmail->config->get('password_ldap_port'))) { … … 25 26 return PASSWORD_CONNECT_ERROR; 26 27 } 27 28 28 29 /* Start TLS */ 29 30 if ($rcmail->config->get('password_ldap_starttls')) { … … 73 74 74 75 $entree[$rcmail->config->get('password_ldap_pwattr')] = $passwd; 76 77 /* Updating PasswordLastChange Attribute if desired */ 78 if ($lchattr = $rcmail->config->get('password_ldap_lchattr')) { 79 $entree[$lchattr] = (int)(time() / 86400) 80 } 81 75 82 76 83 if (!ldap_modify($ds, $user_dn, $entree)) { -
trunk/plugins/password/package.xml
r4016 r4019 16 16 <active>yes</active> 17 17 </lead> 18 <date>2010-09- 29</date>19 <time> 19:00:00</time>18 <date>2010-09-30</date> 19 <time>09:00:00</time> 20 20 <version> 21 <release>1. 8</release>21 <release>1.9</release> 22 22 <api>1.6</api> 23 23 </version> … … 28 28 <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license> 29 29 <notes> 30 - Added possibility to display extended error messages (#1486704) 31 - Added extended error messages in Poppassd driver (#1486704) 30 - Added password_ldap_lchattr option (#1486927) 32 31 </notes> 33 32 <contents> … … 171 170 </notes> 172 171 </release> 172 <release> 173 <date>2010-09-29</date> 174 <time>19:00:00</time> 175 <version> 176 <release>1.8</release> 177 <api>1.6</api> 178 </version> 179 <stability> 180 <release>stable</release> 181 <api>stable</api> 182 </stability> 183 <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license> 184 <notes> 185 - Added possibility to display extended error messages (#1486704) 186 - Added extended error messages in Poppassd driver (#1486704) 187 </notes> 188 </release> 173 189 </changelog> 174 190 </package>
Note: See TracChangeset
for help on using the changeset viewer.
