summaryrefslogtreecommitdiff
path: root/BitUser.php
diff options
context:
space:
mode:
authorChristian Fowler <spider@viovio.com>2007-05-05 04:58:47 +0000
committerChristian Fowler <spider@viovio.com>2007-05-05 04:58:47 +0000
commitf8e924b4f1679ee5a8e74b7b1b8149b7401e1852 (patch)
tree04868a37a01f62ab9523a053db47af7f92d0d0a0 /BitUser.php
parent2738074c4b18f4d4aefc54a2786523ecbe3c2aeb (diff)
downloadusers-f8e924b4f1679ee5a8e74b7b1b8149b7401e1852.tar.gz
users-f8e924b4f1679ee5a8e74b7b1b8149b7401e1852.tar.bz2
users-f8e924b4f1679ee5a8e74b7b1b8149b7401e1852.zip
only remove expired sessions for a few minutes, not an entire hour, check for empty( ['captcha'] )
Diffstat (limited to 'BitUser.php')
-rw-r--r--BitUser.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/BitUser.php b/BitUser.php
index def3d9d..a51354b 100644
--- a/BitUser.php
+++ b/BitUser.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_users/BitUser.php,v 1.131 2007/05/03 06:51:35 squareing Exp $
+ * $Header: /cvsroot/bitweaver/_bit_users/BitUser.php,v 1.132 2007/05/05 04:58:47 spiderr Exp $
*
* Lib for user administration, groups and permissions
* This lib uses pear so the constructor requieres
@@ -12,7 +12,7 @@
* All Rights Reserved. See copyright.txt for details and a complete list of authors.
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details
*
- * $Id: BitUser.php,v 1.131 2007/05/03 06:51:35 squareing Exp $
+ * $Id: BitUser.php,v 1.132 2007/05/05 04:58:47 spiderr Exp $
* @package users
*/
@@ -40,7 +40,7 @@ define("ACCOUNT_DISABLED", -6);
* Class that holds all information for a given user
*
* @author spider <spider@steelsun.com>
- * @version $Revision: 1.131 $
+ * @version $Revision: 1.132 $
* @package users
* @subpackage BitUser
*/
@@ -214,7 +214,7 @@ class BitUser extends LibertyAttachable {
}
}
// Delete old connections nightly during the hour of 3 am
- if( date( 'H' ) == '03' ) {
+ if( date( 'H' ) == '03' && date( 'i' ) > 0 && date( 'i' ) < 2 ) {
// Default to 30 days history
$oldy = $update['last_get'] - ($gBitSystem->getConfig( 'users_cnxn_history_days', 30 ) * 24 * 60);
$query = "DELETE from `".BIT_DB_PREFIX."users_cnxn` where `connect_time`<?";
@@ -589,7 +589,7 @@ class BitUser extends LibertyAttachable {
if( $this->hasPermission( 'p_users_bypass_captcha' ) || ( !empty( $_SESSION['captcha_verified'] ) && $_SESSION['captcha_verified'] === TRUE ) ) {
return TRUE;
} else {
- if( empty( $pCaptcha ) || $_SESSION['captcha'] != md5( $pCaptcha ) ) {
+ if( empty( $pCaptcha ) || empty( $_SESSION['captcha'] ) || $_SESSION['captcha'] != md5( $pCaptcha ) ) {
return FALSE;
} else {
$_SESSION['captcha_verified'] = TRUE;