Version 3.1.4
This commit is contained in:
1 parent
1d4720f3e2
commit
ae5c01cc78
2563 files changed
+283048
-240689
No files matched your search
@@ -1,18 +1,20 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Admin session handler
|
||||
* Last Updated: $Date: 2009-08-24 20:56:22 -0400 (Mon, 24 Aug 2009) $
|
||||
* Last Updated: $Date: 2010-09-16 10:57:26 -0400 (Thu, 16 Sep 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @author $Author: terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @since Who knows...
|
||||
* @version $Revision: 5041 $
|
||||
* @version $Revision: 6883 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -222,6 +224,9 @@ class adminSessions extends ips_MemberRegistry
|
||||
{
|
||||
if ( $session_data['session_running_time'] < ( time() - $_time_out_mins * 60 ) )
|
||||
{
|
||||
self::$data_store = array();
|
||||
self::setMember( 0 );
|
||||
|
||||
$this->_validated = FALSE;
|
||||
return $this->_response( 0, 'session_timeout' );
|
||||
}
|
||||
@@ -237,6 +242,9 @@ class adminSessions extends ips_MemberRegistry
|
||||
|
||||
if ( $first_ip != $second_ip )
|
||||
{
|
||||
self::$data_store = array();
|
||||
self::setMember( 0 );
|
||||
|
||||
$this->_validated = FALSE;
|
||||
return $this->_response( 0, 'session_mismatchip' );
|
||||
}
|
||||
@@ -347,7 +355,7 @@ class adminSessions extends ips_MemberRegistry
|
||||
*/
|
||||
public function getMessage()
|
||||
{
|
||||
return $this->registry->class_localization->words[ $this->_message ];
|
||||
return ( isset($this->registry->class_localization->words[ $this->_message ]) AND $this->registry->class_localization->words[ $this->_message ] ) ? $this->registry->class_localization->words[ $this->_message ] : $this->_message;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,199 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Session API
|
||||
* Created by Matt Mecham
|
||||
* Last Updated: $Date: 2010-10-05 02:50:24 +0100 (Tue, 05 Oct 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author Matt Meckum
|
||||
* @copyright (c) 2001 - 2010 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 6942 $
|
||||
*
|
||||
*/
|
||||
|
||||
class session_api
|
||||
{
|
||||
/**#@+
|
||||
* Registry Object Shortcuts
|
||||
*
|
||||
* @access protected
|
||||
* @var object
|
||||
*/
|
||||
protected $DB;
|
||||
protected $settings;
|
||||
protected $lang;
|
||||
protected $member;
|
||||
protected $memberData;
|
||||
protected $cache;
|
||||
protected $caches;
|
||||
/**#@-*/
|
||||
|
||||
/**
|
||||
* Construct.
|
||||
* @param object Registry object
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
/* Make object */
|
||||
$this->registry = $registry;
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->lang = $this->registry->getClass('class_localization');
|
||||
$this->member = $this->registry->member();
|
||||
$this->memberData =& $this->registry->member()->fetchMemberData();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list (with buildProfilePhoto set) of users in an application
|
||||
* @param string $app
|
||||
* @param array 'fetch' (all, members, guests)
|
||||
* @return array ('stats' => array( 'members', 'guests', 'anon' ), 'rows' => array( ... ) )
|
||||
*/
|
||||
public function getUsersIn( $app, $options=array() )
|
||||
{
|
||||
$return = array( 'stats' => array( 'total' => 0,
|
||||
'members' => 0,
|
||||
'guests' => 0,
|
||||
'bots' => 0,
|
||||
'anon' => 0 ),
|
||||
'rows' => array( 'members' => array(),
|
||||
'bots' => array(),
|
||||
'guests' => array(),
|
||||
'anon' => array() ) );
|
||||
|
||||
$limit = time() - ( $this->settings['au_cutoff'] * 60 );
|
||||
$rows = array();
|
||||
$NOWJIM = time();
|
||||
$cached = array();
|
||||
$where = array( "s.current_appcomponent='" . $app . "'", "s.running_time > " . $limit );
|
||||
|
||||
if ( $this->memberData['member_id'] )
|
||||
{
|
||||
$rows[ $NOWJIM . '.' . $this->memberData['member_id'] ] = array_merge( array( 'id' => $this->member->session_id,
|
||||
'login_type' => substr($this->memberData['login_anonymous'],0, 1),
|
||||
'running_time' => $NOWJIM,
|
||||
'member_id' => $this->memberData['member_id'],
|
||||
'member_name' => $this->memberData['members_display_name'],
|
||||
'member_group' => $this->memberData['member_group_id'],
|
||||
'seo_name' => $this->memberData['members_seo_name'] ), $this->memberData );
|
||||
}
|
||||
|
||||
/* Dee bee */
|
||||
$this->DB->build( array( 'select' => 's.*',
|
||||
'from' => array( 'sessions' => 's' ),
|
||||
'where' => implode( ' AND ', $where ),
|
||||
'add_join' => array( array( 'select' => 'm.*',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => 'm.member_id=s.member_id',
|
||||
'type' => 'left' ) ) ) );
|
||||
|
||||
$this->DB->execute();
|
||||
|
||||
while( $session = $this->DB->fetch() )
|
||||
{
|
||||
if ( ! empty( $session['member_id'] ) AND $session['member_id'] == $this->memberData['member_id'] )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$rows[ $session['running_time'] . '.' . $session['id'] ] = $session;
|
||||
}
|
||||
|
||||
krsort( $rows );
|
||||
|
||||
/* Process them */
|
||||
$filename = IPSLib::getAppDir( $app ) . '/extensions/coreExtensions.php';
|
||||
|
||||
if ( file_exists( $filename ) )
|
||||
{
|
||||
$classToLoad = IPSLib::loadLibrary( $filename, 'publicSessions__' . $app, $app );
|
||||
$loader = new $classToLoad();
|
||||
|
||||
if ( method_exists( $loader, 'parseOnlineEntries' ) )
|
||||
{
|
||||
$rows = $loader->parseOnlineEntries( $rows );
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! count( $rows ) )
|
||||
{
|
||||
return $return;
|
||||
}
|
||||
|
||||
/* Sort through */
|
||||
foreach( $rows as $id => $result )
|
||||
{
|
||||
$last_date = $this->registry->getClass('class_localization')->getTime( $result['running_time'] );
|
||||
|
||||
/* ROBOT - or DODOT! */
|
||||
if ( strstr( $result['id'], '_session' ) )
|
||||
{
|
||||
$botname = preg_replace( '/^(.+?)=/', "\\1", $result['id'] );
|
||||
|
||||
if ( ! $cached[ $result['member_name'] ] )
|
||||
{
|
||||
$result = IPSMember::buildProfilePhoto( 0 );
|
||||
$result['parsedMemberName'] = $result['member_name'];
|
||||
$return['rows']['bots'][] = $result;
|
||||
|
||||
$cached[ $result['member_name'] ] = 1;
|
||||
}
|
||||
|
||||
$return['stats']['bots']++;
|
||||
}
|
||||
/* Guest */
|
||||
else if ( ! $result['member_id'] )
|
||||
{
|
||||
$result = IPSMember::buildProfilePhoto( 0 );
|
||||
$result['parsedMemberName'] = $this->lang->words['global_guestname'];
|
||||
$return['rows']['guests'][] = $result;
|
||||
$return['stats']['guests']++;
|
||||
}
|
||||
/* Member */
|
||||
else
|
||||
{
|
||||
if ( empty( $cached[ $result['member_id'] ] ) )
|
||||
{
|
||||
$cached[ $result['member_id'] ] = 1;
|
||||
|
||||
$result = IPSMember::buildProfilePhoto( $result );
|
||||
$result['parsedMemberName'] = IPSLib::makeNameFormatted( $result['member_name'], $result['member_group'] );
|
||||
|
||||
if ( $result['login_type'] )
|
||||
{
|
||||
if ( $this->memberData['g_access_cp'] and ( $this->settings['disable_admin_anon'] != 1 ) )
|
||||
{
|
||||
$result['parsedMemberName'] = IPSLib::makeProfileLink( $result['parsedMemberName'], $result['member_id'], $result['seo_name'] );
|
||||
$return['rows']['anon'][] = $result;
|
||||
}
|
||||
|
||||
$return['stats']['anon']++;
|
||||
}
|
||||
else
|
||||
{
|
||||
$result['parsedMemberName'] = IPSLib::makeProfileLink( $result['parsedMemberName'], $result['member_id'], $result['seo_name'] );
|
||||
$return['rows']['members'][] = $result;
|
||||
$return['stats']['members']++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$return['stats']['total'] = intval( $return['stats']['bots'] ) + intval( $return['stats']['guests'] ) + intval( $return['stats']['anon'] ) + intval( $return['stats']['members'] );
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,73 +1,75 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* This class overrides parent publicSessions to prevent construct being called
|
||||
* It doesn't do anything else...
|
||||
* Last Updated: $Date: 2009-02-16 11:03:34 -0500 (Mon, 16 Feb 2009) $
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @subpackage IP.Converge
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @since 22nd May 2008 11:15 AM
|
||||
* @version $Revision: 3992 $
|
||||
*
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class convergeSessions extends publicSessions
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @access public
|
||||
* @param object ipsRegistry reference
|
||||
* @return void
|
||||
*/
|
||||
public function __construct( $registry )
|
||||
{
|
||||
/* Make object */
|
||||
$this->registry = ipsRegistry::instance();
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
$this->_member = self::instance();
|
||||
$this->_memberData =& self::instance()->fetchMemberData();
|
||||
|
||||
$this->_userAgent = substr( $this->_member->user_agent, 0, 200 );
|
||||
|
||||
//-----------------------------------------
|
||||
// Fix up app / section / module
|
||||
//-----------------------------------------
|
||||
|
||||
$this->current_appcomponent = IPS_APP_COMPONENT;
|
||||
$this->current_module = IPSText::alphanumericalClean( $this->request['module'] );
|
||||
$this->current_section = IPSText::alphanumericalClean( $this->request['section'] );
|
||||
|
||||
$this->settings['session_expiration'] = ( $this->settings['session_expiration'] ) ? $this->settings['session_expiration'] : 60;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a member session
|
||||
*
|
||||
* @access public
|
||||
* @return string Session id
|
||||
*/
|
||||
public function createMemberSession()
|
||||
{
|
||||
parent::_createMemberSession();
|
||||
|
||||
return $this->session_data['id'];
|
||||
}
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* This class overrides parent publicSessions to prevent construct being called
|
||||
* It doesn't do anything else...
|
||||
* Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage IP.Converge
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 22nd May 2008 11:15 AM
|
||||
* @version $Revision: 5713 $
|
||||
*
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class convergeSessions extends publicSessions
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @access public
|
||||
* @param object ipsRegistry reference
|
||||
* @return void
|
||||
*/
|
||||
public function __construct( $registry )
|
||||
{
|
||||
/* Make object */
|
||||
$this->registry = ipsRegistry::instance();
|
||||
$this->DB = $this->registry->DB();
|
||||
$this->settings =& $this->registry->fetchSettings();
|
||||
$this->request =& $this->registry->fetchRequest();
|
||||
$this->cache = $this->registry->cache();
|
||||
$this->caches =& $this->registry->cache()->fetchCaches();
|
||||
$this->_member = self::instance();
|
||||
$this->_memberData =& self::instance()->fetchMemberData();
|
||||
|
||||
$this->_userAgent = substr( $this->_member->user_agent, 0, 200 );
|
||||
|
||||
//-----------------------------------------
|
||||
// Fix up app / section / module
|
||||
//-----------------------------------------
|
||||
|
||||
$this->current_appcomponent = IPS_APP_COMPONENT;
|
||||
$this->current_module = IPSText::alphanumericalClean( $this->request['module'] );
|
||||
$this->current_section = IPSText::alphanumericalClean( $this->request['section'] );
|
||||
|
||||
$this->settings['session_expiration'] = ( $this->settings['session_expiration'] ) ? $this->settings['session_expiration'] : 60;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a member session
|
||||
*
|
||||
* @access public
|
||||
* @return string Session id
|
||||
*/
|
||||
public function createMemberSession()
|
||||
{
|
||||
parent::_createMemberSession();
|
||||
|
||||
return $this->session_data['id'];
|
||||
}
|
||||
}
|
||||
@@ -1 +1,10 @@
|
||||
<html>␍<head><title>IP.Board - Bulletin Board System</title></head>␍<body>␍<h1>403: IP.Board -> Forbidden</h1>␍<hr>␍You have reached this page in error, please use your back button to return to the forum.␍<hr>␍<a href="http://www.invisionboard.com/">IP.Board</a>␍</body>␍</html>␍
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,18 +1,20 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Public session handler
|
||||
* Last Updated: $Date: 2009-10-14 07:03:55 -0400 (Wed, 14 Oct 2009) $
|
||||
* Last Updated: $Date: 2010-10-06 06:09:32 -0400 (Wed, 06 Oct 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: matt $
|
||||
* @author $Author: mmecham $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 26th January 2004
|
||||
* @version $Revision: 5229 $
|
||||
* @version $Revision: 6946 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -551,7 +553,14 @@ class publicSessions extends ips_MemberRegistry
|
||||
}
|
||||
else
|
||||
{
|
||||
@header('HTTP/1.1 403 Forbidden');
|
||||
if ( isset( $_SERVER['SERVER_PROTOCOL'] ) AND strstr( $_SERVER['SERVER_PROTOCOL'], '/1.0' ) )
|
||||
{
|
||||
@header('HTTP/1.0 403 Forbidden');
|
||||
}
|
||||
else
|
||||
{
|
||||
@header('HTTP/1.1 403 Forbidden');
|
||||
}
|
||||
}
|
||||
|
||||
@header("Cache-Control: no-cache, must-revalidate, max-age=0");
|
||||
@@ -567,7 +576,7 @@ class publicSessions extends ips_MemberRegistry
|
||||
// Still no member id and not a bot?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! self::$data_store['member_id'] AND ! $this->_member->is_not_human )
|
||||
if ( empty( self::$data_store['member_id'] ) AND ! $this->_member->is_not_human )
|
||||
{
|
||||
self::setMember(0);
|
||||
|
||||
@@ -579,8 +588,8 @@ class publicSessions extends ips_MemberRegistry
|
||||
// Set a session ID cookie
|
||||
//-----------------------------------------
|
||||
|
||||
$this->_member->session_type = $this->session_type;
|
||||
$this->_member->session_id = $this->session_id;
|
||||
$this->_member->session_type = $this->session_type;
|
||||
$this->_member->session_id = $this->session_id;
|
||||
|
||||
IPSCookie::set("session_id", $this->session_id, -1);
|
||||
}
|
||||
@@ -596,7 +605,7 @@ class publicSessions extends ips_MemberRegistry
|
||||
*/
|
||||
public function addQueryKey( $key, $value, $sessionID='' )
|
||||
{
|
||||
$sessionID = ( $sessionID ) ? IPSText::md5Clean( $sessionID ) : $this->session_id;
|
||||
$sessionID = ( $sessionID ) ? substr( IPSText::alphanumericalClean( $sessionID, '_=' ), 0, 32 ) : $this->session_id;
|
||||
|
||||
if ( $key )
|
||||
{
|
||||
@@ -672,7 +681,6 @@ class publicSessions extends ips_MemberRegistry
|
||||
'member_group' => self::$data_store['member_group_id'],
|
||||
'login_type' => intval(substr(self::$data_store['login_anonymous'],0, 1)),
|
||||
'running_time' => IPS_UNIX_TIME_NOW,
|
||||
'location' => isset( $vars['location'] ) ? $vars['location'] : '',
|
||||
'in_error' => 0,
|
||||
'current_appcomponent' => $this->current_appcomponent,
|
||||
'current_module' => $this->current_module,
|
||||
@@ -697,7 +705,7 @@ class publicSessions extends ips_MemberRegistry
|
||||
|
||||
/* Reset some data */
|
||||
$this->session_type = 'cookie';
|
||||
$this->session_id = "";
|
||||
//$this->session_id = "";
|
||||
}
|
||||
|
||||
/* Set type */
|
||||
@@ -777,7 +785,6 @@ class publicSessions extends ips_MemberRegistry
|
||||
'member_group' => $memberGroup,
|
||||
'login_type' => $loginType,
|
||||
'running_time' => IPS_UNIX_TIME_NOW,
|
||||
'location' => $vars['location'],
|
||||
'in_error' => 0,
|
||||
'current_appcomponent' => $this->current_appcomponent,
|
||||
'current_module' => $this->current_module,
|
||||
@@ -802,7 +809,7 @@ class publicSessions extends ips_MemberRegistry
|
||||
|
||||
/* Reset some data */
|
||||
$this->session_type = 'cookie';
|
||||
$this->session_id = "";
|
||||
//$this->session_id = "";
|
||||
}
|
||||
|
||||
/* Set type */
|
||||
@@ -868,7 +875,6 @@ class publicSessions extends ips_MemberRegistry
|
||||
'running_time' => IPS_UNIX_TIME_NOW,
|
||||
'ip_address' => $this->_member->ip_address,
|
||||
'browser' => $this->_userAgent,
|
||||
'location' => isset( $vars['location'] ) ? $vars['location'] : '',
|
||||
'in_error' => 0,
|
||||
'current_appcomponent' => $this->current_appcomponent,
|
||||
'current_module' => $this->current_module,
|
||||
@@ -943,7 +949,7 @@ class publicSessions extends ips_MemberRegistry
|
||||
|
||||
/* Reset some data */
|
||||
$this->session_type = 'cookie';
|
||||
$this->session_id = "";
|
||||
//$this->session_id = "";
|
||||
}
|
||||
|
||||
/* Set type */
|
||||
@@ -1044,7 +1050,6 @@ class publicSessions extends ips_MemberRegistry
|
||||
'running_time' => IPS_UNIX_TIME_NOW,
|
||||
'ip_address' => $this->_member->ip_address,
|
||||
'browser' => substr( $this->_member->user_agent, 0, 200 ),
|
||||
'location' => $vars['location'],
|
||||
'in_error' => 0,
|
||||
'current_appcomponent' => $this->current_appcomponent,
|
||||
'current_module' => $this->current_module,
|
||||
@@ -1083,7 +1088,7 @@ class publicSessions extends ips_MemberRegistry
|
||||
|
||||
/* Reset some data */
|
||||
$this->session_type = 'cookie';
|
||||
$this->session_id = "";
|
||||
//$this->session_id = "";
|
||||
}
|
||||
|
||||
/* Set type */
|
||||
@@ -1097,20 +1102,24 @@ class publicSessions extends ips_MemberRegistry
|
||||
*
|
||||
* @access public
|
||||
* @param array Array of incoming data (member_id, member_name, member_group, login_type)
|
||||
* @param array Optional array of member data (prevents having to reload it)
|
||||
* @return string Current session ID
|
||||
*/
|
||||
public function convertGuestToMember( $data )
|
||||
public function convertGuestToMember( $data, $member=array() )
|
||||
{
|
||||
/* Delete old sessions */
|
||||
$this->_destroySessions( "ip_address='" . $this->_member->ip_address . "' AND id != '{$this->session_id}'" );
|
||||
|
||||
/* Fetch member */
|
||||
$member = IPSMember::load( $data['member_id'], 'core' );
|
||||
if( !$member['member_id'] )
|
||||
{
|
||||
$member = IPSMember::load( $data['member_id'], 'core' );
|
||||
}
|
||||
|
||||
/* Update this session directly */
|
||||
$this->DB->update( 'sessions', array(
|
||||
'member_name' => $data['member_name'],
|
||||
'seo_name' => IPSText::makeSeoTitle( $data['member_name'] ),
|
||||
'seo_name' => $member['members_seo_name'],
|
||||
'member_id' => $data['member_id'],
|
||||
'running_time' => time(),
|
||||
'member_group' => $data['member_group'],
|
||||
@@ -1126,10 +1135,6 @@ class publicSessions extends ips_MemberRegistry
|
||||
{
|
||||
$update['last_visit'] = $member['last_activity'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$update['last_visit'] = time();
|
||||
}
|
||||
|
||||
/* Make sure last activity and last visit are up to date */
|
||||
IPSMember::save( $data['member_id'], array( 'core' => $update ) );
|
||||
@@ -1157,12 +1162,13 @@ class publicSessions extends ips_MemberRegistry
|
||||
$this->_destroySessions( "ip_address='" . $this->_member->ip_address . "' AND id != '{$this->session_id}'" );
|
||||
|
||||
/* Update this session directly */
|
||||
$this->DB->update( 'sessions', array(
|
||||
'member_name' => '',
|
||||
'seo_name' => '',
|
||||
'member_id' => 0,
|
||||
'running_time' => time(),
|
||||
'member_group' => $this->settings['guest_group'] ) , "id='" . $this->session_id . "'", TRUE );
|
||||
$data = array( 'member_name' => '',
|
||||
'seo_name' => '',
|
||||
'member_id' => 0,
|
||||
'running_time' => time(),
|
||||
'member_group' => $this->settings['guest_group'] );
|
||||
|
||||
$this->DB->update( 'sessions', $data, "id='" . $this->session_id . "'", TRUE );
|
||||
|
||||
/* Remove from update and delete array */
|
||||
unset( $this->_sessionsToSave[ $this->session_id ] );
|
||||
@@ -1233,7 +1239,7 @@ class publicSessions extends ips_MemberRegistry
|
||||
//-----------------------------------------
|
||||
|
||||
$result = array();
|
||||
$session_id = IPSText::md5Clean( $session_id );
|
||||
$session_id = substr( IPSText::alphanumericalClean( $session_id, '_=' ), 0, 32 );
|
||||
|
||||
if ( $session_id )
|
||||
{
|
||||
@@ -1321,7 +1327,6 @@ class publicSessions extends ips_MemberRegistry
|
||||
$this->session_id = $this->session_data['id'];
|
||||
$this->session_user_id = $this->session_data['member_id'];
|
||||
$this->last_click = $this->session_data['running_time'];
|
||||
$this->location = $this->session_data['location'];
|
||||
|
||||
IPSDebug::addLogMessage( "Authorization attempt successful: Session ID={$session_id}, member ID={$this->session_data['member_id']} ", 'sessions-' . $this->session_data['member_id'] );
|
||||
|
||||
@@ -1466,7 +1471,7 @@ class publicSessions extends ips_MemberRegistry
|
||||
//-----------------------------------------
|
||||
|
||||
$memberID = intval( $memberID );
|
||||
$sessionID = IPSText::md5Clean( $sessionID );
|
||||
$sessionID = substr( IPSText::alphanumericalClean( $sessionID, '_=' ), 0, 32 );
|
||||
$_data = array();
|
||||
$_ignore = array( 'id',
|
||||
'member_id',
|
||||
|
||||
@@ -1,18 +1,20 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Sample SSO Class
|
||||
* Last Updated: $Date: 2009-08-18 21:46:25 +0100 (Tue, 18 Aug 2009) $
|
||||
* Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: matt $
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 22nd Septmeber 2009
|
||||
* @version $Revision: 5027 $
|
||||
* @version $Revision: 5713 $
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
Reference in new issue
Block a user