Skip to content

Commit 3caee98

Browse files
author
ifsale
committed
new release
2 parents d4a7bc3 + 657710f commit 3caee98

File tree

3 files changed

+13
-56
lines changed

3 files changed

+13
-56
lines changed

PtcAuth.php

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,7 @@ public static function logout( $destroySession = false )
452452
static::_fireEvent( 'before_logout' , array( $user_id , &$destroySession ) );
453453
if ( isset( $_SESSION[ 'user_id' ] ) )
454454
{
455+
$options = static::$_options;
455456
static::_connection( static::$_options[ 'login_table' ] )
456457
->where( 'user_id' , '=' , $_SESSION[ 'user_id' ] )
457458
->delete( )
@@ -463,12 +464,17 @@ public static function logout( $destroySession = false )
463464
$query->where( 'expires' , '<' , $query->raw( 'NOW()' ) )
464465
->rawSelect( ' OR `expires` IS NULL' );
465466
} )->delete( )->run( );*/
466-
if ( @static::$_options[ 'remember_options' ][ 'param' ] )
467+
if ( @$_options[ 'remember_options' ][ 'param' ] )
467468
{
468469
$update = array( static::$_tableColumns[ 'remember' ] => '' );
469-
static::_connection( static::$_options[ 'users_table' ] )
470+
static::_connection( $_options[ 'users_table' ] )
470471
->update( static::_track( $update ) , $_SESSION[ 'user_id' ] )
471472
->run( );
473+
/*if ( static::getCookie( $_options[ 'remember_options' ][ 'param' ] ) )
474+
{
475+
//static::setCookie( $options[ 'param' ] , '' , strtotime( '-1 day' ) , $options[ 'path' ] ,
476+
// $options[ 'domain' ] , $options[ 'secure' ] , $options[ 'http_only' ] );
477+
}*/
472478
}
473479
}
474480
unset( $_SESSION[ 'token' ] );
@@ -532,7 +538,8 @@ public static function check( )
532538
if ( $user = static::_checkCookie( ) )
533539
{
534540
return ( static::_processLogin(
535-
$user->{ $columns[ 'unique_key' ] } , 'update' ) ) ? true : false;
541+
$user->{ static::$_tableColumns[ 'unique_key' ] }
542+
, 'update' ) ) ? true : false;
536543
}
537544
}
538545
if ( !isset( $_SESSION[ 'user_id' ] ) ){ return false; }
@@ -844,8 +851,9 @@ protected static function _checkConfig( $columns )
844851
if ( static::$_options[ 'use_dates' ] )
845852
{
846853
if ( !@$columns[ 'created' ] ||
847-
!@$columns[ 'update' ] || !@$columns[ 'last_login' ] )
854+
!@$columns[ 'updated' ] || !@$columns[ 'last_login' ] )
848855
{
856+
849857
trigger_error( 'Cannot track user activity , please make sure ' .
850858
' that all columns for use_dates are available' , E_USER_ERROR );
851859
return false;

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
}
1414
],
1515
"require": {
16-
"php": ">=5.3.0"
16+
"php": ">=5.4.0"
1717
}
1818
}

test.curl.php

Lines changed: 0 additions & 51 deletions
This file was deleted.

0 commit comments

Comments
 (0)