diff options
| author | wjames5 <will@tekimaki.com> | 2010-02-24 16:12:46 +0000 |
|---|---|---|
| committer | wjames5 <will@tekimaki.com> | 2010-02-24 16:12:46 +0000 |
| commit | b903eb3aa56f912ace472f1f9e8decddea9d166b (patch) | |
| tree | e8873c0515a6c11fe228dd8ef81b06a58403e050 | |
| parent | 4e9a8f2a2ed9332feb67679f3524db01b5ea1328 (diff) | |
| download | users-b903eb3aa56f912ace472f1f9e8decddea9d166b.tar.gz users-b903eb3aa56f912ace472f1f9e8decddea9d166b.tar.bz2 users-b903eb3aa56f912ace472f1f9e8decddea9d166b.zip | |
on change password make sure there is an actual pass due value if going to set it
| -rw-r--r-- | BitUser.php | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/BitUser.php b/BitUser.php index 344094f..4e94979 100644 --- a/BitUser.php +++ b/BitUser.php @@ -1,6 +1,6 @@ <?php /** - * $Header: /cvsroot/bitweaver/_bit_users/BitUser.php,v 1.259 2010/02/22 15:32:28 spiderr Exp $ + * $Header: /cvsroot/bitweaver/_bit_users/BitUser.php,v 1.260 2010/02/24 16:12:46 wjames5 Exp $ * * Lib for user administration, groups and permissions * This lib uses pear so the constructor requieres @@ -12,7 +12,7 @@ * All Rights Reserved. See below for details and a complete list of authors. * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html for details * - * $Id: BitUser.php,v 1.259 2010/02/22 15:32:28 spiderr Exp $ + * $Id: BitUser.php,v 1.260 2010/02/24 16:12:46 wjames5 Exp $ * @package users */ @@ -42,7 +42,7 @@ define( "ACCOUNT_DISABLED", -6 ); * Class that holds all information for a given user * * @author spider <spider@steelsun.com> - * @version $Revision: 1.259 $ + * @version $Revision: 1.260 $ * @package users * @subpackage BitUser */ @@ -1612,8 +1612,13 @@ error_log( print_r( $update, TRUE ) ); if( !empty( $pLogin )) { $ret = TRUE; $hash = md5( $pPass ); - $now = $gBitSystem->getUTCTime();; - $passDue = $now + ( 60 * 60 * 24 * $gBitSystem->getConfig( 'users_pass_due' )); + // if renew password config is set then set - otherwise set null to respect no pass due + $passDue = NULL; + if( $gBitSystem->getConfig('users_pass_due') ) { + $now = $gBitSystem->getUTCTime();; + // renew password according to config value + $passDue = $now + ( 60 * 60 * 24 * $gBitSystem->getConfig( 'users_pass_due' )); + } if( !$gBitSystem->isFeatureActive( 'users_clear_passwords' )) { $pPass = NULL; } |
