Version 3.4.6

This commit is contained in:
Neo committed 2025-12-19 00:40:53 -08:00
1 parent e4478369d8
commit b45ea0dffb
1568 files changed
+155104 -161665

No files matched your search

@@ -7,7 +7,7 @@
* $Author: mmecham $
* @since -
* $LastChangedDate: 2013-03-19 09:02:31 -0400 (Tue, 19 Mar 2013) $
* @version v3.4.5
* @version v3.4.6
* $Revision: 12085 $
*/
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Update captcha image
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Image Ajax
* Last Updated: $LastChangedDate: 2013-02-08 10:22:34 -0500 (Fri, 08 Feb 2013) $
* </pre>
@@ -7,7 +7,7 @@
* $Author: ips_terabyte $
* @since 20th February 2002
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
* @version v3.4.5
* @version v3.4.6
* $Revision: 8655 $
*/
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Handles ajax functions for IP.Board Text Editor
* Author: Matt "Matt Mecham" Mecham
* Last Updated: $LastChangedDate: 2012-10-10 06:39:40 -0400 (Wed, 10 Oct 2012) $
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Login handler abstraction : AJAX login
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
@@ -1,110 +1,110 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* Login handler abstraction : AJAX Find Names functions
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @since Tuesday 1st March 2005 (11:52)
* @version $Revision: 10721 $
* @see admin_core_ajax_findnames
*
*/
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 public_core_ajax_findnames extends ipsAjaxCommand
{
/**
* Class entry point
*
* @param object Registry reference
* @return @e void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
switch( $this->request['do'] )
{
case 'get-member-names':
$this->_getMemberNames();
break;
}
}
/**
* Returns possible matches for the string input
*
* @return @e void Outputs to screen
*/
protected function _getMemberNames()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$name = IPSText::convertUnicode( $this->convertAndMakeSafe( $this->request['name'], 0 ), true );
$name = IPSText::convertCharsets( $name, 'utf-8', IPS_DOC_CHAR_SET );
//-----------------------------------------
// Check length
//-----------------------------------------
if ( IPSText::mbstrlen( $name ) < 3 )
{
$this->returnJsonError( 'requestTooShort' );
}
//-----------------------------------------
// Try query...
//-----------------------------------------
$this->DB->build( array( 'select' => 'm.members_display_name, m.name, m.member_id, m.member_group_id',
'from' => array( 'members' => 'm' ),
'where' => "m.members_l_display_name LIKE '" . $this->DB->addSlashes( mb_strtolower( $name ) ) . "%'",
'order' => $this->DB->buildLength( 'm.members_display_name' ) . ' ASC',
'limit' => array( 0, 15 ),
'add_join' => array( array( 'select' => 'p.*',
'from' => array( 'profile_portal' => 'p' ),
'where' => 'p.pp_member_id=m.member_id',
'type' => 'left' ) ) ) );
$this->DB->execute();
//-----------------------------------------
// Got any results?
//-----------------------------------------
if ( ! $this->DB->getTotalRows() )
{
$this->returnJsonArray( array( ) );
}
$return = array();
while( $r = $this->DB->fetch() )
{
$photo = IPSMember::buildProfilePhoto( $r );
$group = IPSMember::makeNameFormatted( '' , $r['member_group_id'] );
$return[ $r['member_id'] ] = array( 'name' => $r['members_display_name'],
'showas'=> '<strong>' . $r['members_display_name'] . '</strong> (' . $group . ')',
'img' => $photo['pp_mini_photo'],
'img_w' => $photo['pp_mini_width'],
'img_h' => $photo['pp_mini_height']
);
}
$this->returnJsonArray( $return );
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.6
* Login handler abstraction : AJAX Find Names functions
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @since Tuesday 1st March 2005 (11:52)
* @version $Revision: 10721 $
* @see admin_core_ajax_findnames
*
*/
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 public_core_ajax_findnames extends ipsAjaxCommand
{
/**
* Class entry point
*
* @param object Registry reference
* @return @e void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
switch( $this->request['do'] )
{
case 'get-member-names':
$this->_getMemberNames();
break;
}
}
/**
* Returns possible matches for the string input
*
* @return @e void Outputs to screen
*/
protected function _getMemberNames()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$name = IPSText::convertUnicode( $this->convertAndMakeSafe( $this->request['name'], 0 ), true );
$name = IPSText::convertCharsets( $name, 'utf-8', IPS_DOC_CHAR_SET );
//-----------------------------------------
// Check length
//-----------------------------------------
if ( IPSText::mbstrlen( $name ) < 3 )
{
$this->returnJsonError( 'requestTooShort' );
}
//-----------------------------------------
// Try query...
//-----------------------------------------
$this->DB->build( array( 'select' => 'm.members_display_name, m.name, m.member_id, m.member_group_id',
'from' => array( 'members' => 'm' ),
'where' => "m.members_l_display_name LIKE '" . $this->DB->addSlashes( strtolower( $name ) ) . "%'",
'order' => $this->DB->buildLength( 'm.members_display_name' ) . ' ASC',
'limit' => array( 0, 15 ),
'add_join' => array( array( 'select' => 'p.*',
'from' => array( 'profile_portal' => 'p' ),
'where' => 'p.pp_member_id=m.member_id',
'type' => 'left' ) ) ) );
$this->DB->execute();
//-----------------------------------------
// Got any results?
//-----------------------------------------
if ( ! $this->DB->getTotalRows() )
{
$this->returnJsonArray( array( ) );
}
$return = array();
while( $r = $this->DB->fetch() )
{
$photo = IPSMember::buildProfilePhoto( $r );
$group = IPSMember::makeNameFormatted( '' , $r['member_group_id'] );
$return[ $r['member_id'] ] = array( 'name' => $r['members_display_name'],
'showas'=> '<strong>' . $r['members_display_name'] . '</strong> (' . $group . ')',
'img' => $photo['pp_mini_photo'],
'img_w' => $photo['pp_mini_width'],
'img_h' => $photo['pp_mini_height']
);
}
$this->returnJsonArray( $return );
}
}
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
IP.Board
</body>
</html>
@@ -7,7 +7,7 @@
* $Author: bfarber $
* @since -
* $LastChangedDate: 2011-08-05 20:51:01 -0400 (Fri, 05 Aug 2011) $
* @version v3.4.5
* @version v3.4.6
* $Revision: 9373 $
*/
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Login handler abstraction : AJAX login
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Handles ajax functions for IP.Board Text Editor
* Author: Matt "Matt Mecham" Mecham
* Last Updated: $LastChangedDate: 2012-06-07 06:21:09 -0400 (Thu, 07 Jun 2012) $
@@ -1,175 +1,175 @@
<?php
/**
* @file modcp.php Moderator control panel AJAX retrieve tab
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: mark $
* @since 2/14/2011
* $LastChangedDate: 2011-11-16 11:36:38 -0500 (Wed, 16 Nov 2011) $
* @version v3.4.5
* $Revision: 9829 $
*/
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
/**
*
* @class public_core_ajax_modcp
* @brief Moderator control panel
*
*/
class public_core_ajax_modcp extends ipsAjaxCommand
{
/**
* Main function executed automatically by the controller
*
* @param object $registry Registry object
* @return @e void
*/
public function doExecute( ipsRegistry $registry )
{
//-----------------------------------------
// Load basic things
//-----------------------------------------
$this->registry->class_localization->loadLanguageFile( array( 'public_modcp' ) );
//-----------------------------------------
// Which road are we going to take?
//-----------------------------------------
switch( $this->request['do'] )
{
default:
case 'index':
$this->_getTab();
break;
case 'getmembers':
$this->_getMembers();
break;
}
//-----------------------------------------
// Output
//-----------------------------------------
$this->registry->getClass('output')->addContent( $this->output );
$this->registry->output->sendOutput();
}
/**
* Returns possible matches for the string input
*
* @return @e void Outputs to screen
*/
protected function _getMembers()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$name = IPSText::convertUnicode( $this->convertAndMakeSafe( $this->request['name'], 0 ), true );
$name = IPSText::convertCharsets( $name, 'utf-8', IPS_DOC_CHAR_SET );
//-----------------------------------------
// Check length
//-----------------------------------------
if ( IPSText::mbstrlen( $name ) < 3 )
{
$this->returnJsonError( 'requestTooShort' );
}
//-----------------------------------------
// Try query...
//-----------------------------------------
$this->DB->build( array( 'select' => 'm.members_display_name, m.member_id, m.members_seo_name, m.member_group_id',
'from' => array( 'members' => 'm' ),
'where' => "m.members_l_display_name LIKE '" . $this->DB->addSlashes( mb_strtolower( $name ) ) . "%'",
'order' => $this->DB->buildLength( 'm.members_display_name' ) . ' ASC',
'limit' => array( 0, 15 ),
'add_join' => array( array( 'select' => 'p.*',
'from' => array( 'profile_portal' => 'p' ),
'where' => 'p.pp_member_id=m.member_id',
'type' => 'left' ) ) ) );
$this->DB->execute();
//-----------------------------------------
// Got any results?
//-----------------------------------------
if ( ! $this->DB->getTotalRows() )
{
$this->returnJsonArray( array( ) );
}
$return = array();
while( $r = $this->DB->fetch() )
{
$url = $this->registry->output->buildSEOUrl( "app=core&amp;module=modcp&amp;do=editmember&amp;mid={$r['member_id']}", 'public' );
$photo = IPSMember::buildProfilePhoto( $r );
$group = IPSMember::makeNameFormatted( '' , $r['member_group_id'] );
$return[ $r['member_id'] ] = array( 'name' => $r['members_display_name'],
'showas'=> '<strong>' . $r['members_display_name'] . '</strong> (' . $group . ')',
'img' => $photo['pp_thumb_photo'],
'img_w' => $photo['pp_mini_width'],
'img_h' => $photo['pp_mini_height'],
'url' => $url,
);
}
$this->returnJsonArray( $return );
}
/**
* Retrieve modcp tab based
*
* @return @e void
*/
protected function _getTab()
{
//-----------------------------------------
// Init
//-----------------------------------------
ipsRegistry::getAppClass( 'forums' );
$app = trim($this->request['fromapp']);
$plugin = trim($this->request['tab']);
$moderator = $this->registry->class_forums->getModerator();
$_output = '';
//-----------------------------------------
// Get plugin output
//-----------------------------------------
if( is_file( IPSLib::getAppDir( $app ) . '/extensions/modcp/plugin_' . $app . '_' . $plugin . '.php' ) )
{
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( $app ) . '/extensions/modcp/plugin_' . $app . '_' . $plugin . '.php', 'plugin_' . $app . '_' . $plugin, $app );
$_thisPlugin = new $classToLoad( $this->registry );
$_output = $_thisPlugin->executePlugin( $moderator );
}
//-----------------------------------------
// Output
//-----------------------------------------
if( $_output )
{
$this->returnJsonArray( array( 'html' => $_output ) );
}
else
{
$this->returnJsonError( $this->lang->words['plugin_not_found'] );
}
}
<?php
/**
* @file modcp.php Moderator control panel AJAX retrieve tab
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: mark $
* @since 2/14/2011
* $LastChangedDate: 2011-11-16 11:36:38 -0500 (Wed, 16 Nov 2011) $
* @version v3.4.6
* $Revision: 9829 $
*/
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
/**
*
* @class public_core_ajax_modcp
* @brief Moderator control panel
*
*/
class public_core_ajax_modcp extends ipsAjaxCommand
{
/**
* Main function executed automatically by the controller
*
* @param object $registry Registry object
* @return @e void
*/
public function doExecute( ipsRegistry $registry )
{
//-----------------------------------------
// Load basic things
//-----------------------------------------
$this->registry->class_localization->loadLanguageFile( array( 'public_modcp' ) );
//-----------------------------------------
// Which road are we going to take?
//-----------------------------------------
switch( $this->request['do'] )
{
default:
case 'index':
$this->_getTab();
break;
case 'getmembers':
$this->_getMembers();
break;
}
//-----------------------------------------
// Output
//-----------------------------------------
$this->registry->getClass('output')->addContent( $this->output );
$this->registry->output->sendOutput();
}
/**
* Returns possible matches for the string input
*
* @return @e void Outputs to screen
*/
protected function _getMembers()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$name = IPSText::convertUnicode( $this->convertAndMakeSafe( $this->request['name'], 0 ), true );
$name = IPSText::convertCharsets( $name, 'utf-8', IPS_DOC_CHAR_SET );
//-----------------------------------------
// Check length
//-----------------------------------------
if ( IPSText::mbstrlen( $name ) < 3 )
{
$this->returnJsonError( 'requestTooShort' );
}
//-----------------------------------------
// Try query...
//-----------------------------------------
$this->DB->build( array( 'select' => 'm.members_display_name, m.member_id, m.members_seo_name, m.member_group_id',
'from' => array( 'members' => 'm' ),
'where' => "m.members_l_display_name LIKE '" . $this->DB->addSlashes( strtolower( $name ) ) . "%'",
'order' => $this->DB->buildLength( 'm.members_display_name' ) . ' ASC',
'limit' => array( 0, 15 ),
'add_join' => array( array( 'select' => 'p.*',
'from' => array( 'profile_portal' => 'p' ),
'where' => 'p.pp_member_id=m.member_id',
'type' => 'left' ) ) ) );
$this->DB->execute();
//-----------------------------------------
// Got any results?
//-----------------------------------------
if ( ! $this->DB->getTotalRows() )
{
$this->returnJsonArray( array( ) );
}
$return = array();
while( $r = $this->DB->fetch() )
{
$url = $this->registry->output->buildSEOUrl( "app=core&amp;module=modcp&amp;do=editmember&amp;mid={$r['member_id']}", 'public' );
$photo = IPSMember::buildProfilePhoto( $r );
$group = IPSMember::makeNameFormatted( '' , $r['member_group_id'] );
$return[ $r['member_id'] ] = array( 'name' => $r['members_display_name'],
'showas'=> '<strong>' . $r['members_display_name'] . '</strong> (' . $group . ')',
'img' => $photo['pp_thumb_photo'],
'img_w' => $photo['pp_mini_width'],
'img_h' => $photo['pp_mini_height'],
'url' => $url,
);
}
$this->returnJsonArray( $return );
}
/**
* Retrieve modcp tab based
*
* @return @e void
*/
protected function _getTab()
{
//-----------------------------------------
// Init
//-----------------------------------------
ipsRegistry::getAppClass( 'forums' );
$app = trim($this->request['fromapp']);
$plugin = trim($this->request['tab']);
$moderator = $this->registry->class_forums->getModerator();
$_output = '';
//-----------------------------------------
// Get plugin output
//-----------------------------------------
if( is_file( IPSLib::getAppDir( $app ) . '/extensions/modcp/plugin_' . $app . '_' . $plugin . '.php' ) )
{
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( $app ) . '/extensions/modcp/plugin_' . $app . '_' . $plugin . '.php', 'plugin_' . $app . '_' . $plugin, $app );
$_thisPlugin = new $classToLoad( $this->registry );
$_output = $_thisPlugin->executePlugin( $moderator );
}
//-----------------------------------------
// Output
//-----------------------------------------
if( $_output )
{
$this->returnJsonArray( array( 'html' => $_output ) );
}
else
{
$this->returnJsonError( $this->lang->words['plugin_not_found'] );
}
}
}
@@ -6,7 +6,7 @@
* $Author: bfarber $
* @since 2/14/2011
* $LastChangedDate: 2011-04-27 19:56:50 -0400 (Wed, 27 Apr 2011) $
* @version v3.4.5
* @version v3.4.6
* $Revision: 8514 $
*/
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Notification AJAX methods
* Last Updated: $Date: 2012-08-28 17:56:22 -0400 (Tue, 28 Aug 2012) $
* </pre>
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Registration AJAX routines
* Last Updated: $Date: 2012-07-19 11:49:35 -0400 (Thu, 19 Jul 2012) $
* </pre>
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Reports AJAX options
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
@@ -2,18 +2,18 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Reputation
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* Last Updated: $Date: 2013-10-16 19:11:24 -0400 (Wed, 16 Oct 2013) $
* </pre>
*
* @author $Author: bfarber $
* @author $Author: rashbrook $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @version $Rev: 10721 $
* @version $Rev: 12381 $
*/
if ( ! defined( 'IN_IPB' ) )
@@ -60,7 +60,7 @@ class public_core_ajax_reputation extends ipsAjaxCommand
{
$this->lang->loadLanguageFile( array( 'public_topic' ), 'forums' );
if ( !$this->memberData['gbw_view_reps'] )
if ( !$this->memberData['gbw_view_reps'] AND $this->settings['reputation_point_types'] != 'like' )
{
$this->returnJsonError('no_permission');
}
@@ -107,6 +107,11 @@ class public_core_ajax_reputation extends ipsAjaxCommand
*/
protected function _more()
{
if ( ! $this->memberData['gbw_view_reps'] AND $this->settings['reputation_point_types'] != 'like' )
{
$this->returnJsonError('no_permission');
}
$app = trim( $this->request['f_app'] );
$type = trim( $this->request['f_type'] );
$id = intval( $this->request['f_id'] );
@@ -6,7 +6,7 @@
* $Author: AndyMillne $
* @since 2/14/2011
* $LastChangedDate: 2013-03-22 17:35:37 -0400 (Fri, 22 Mar 2013) $
* @version v3.4.5
* @version v3.4.6
* $Revision: 12112 $
*/
@@ -6,7 +6,7 @@
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: mmecham $
* $LastChangedDate: 2012-09-19 10:57:30 -0400 (Wed, 19 Sep 2012) $
* @version v3.4.5
* @version v3.4.6
* $Revision: 11350 $
*/
@@ -7,7 +7,7 @@
* $Author: bfarber $
* @since -
* $LastChangedDate: 2011-08-06 01:51:01 +0100 (Sat, 06 Aug 2011) $
* @version v3.4.5
* @version v3.4.6
* $Revision: 9373 $
*/
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Like Ajax
* Last Updated: $LastChangedDate: 2011-05-05 12:03:47 +0100 (Thu, 05 May 2011) $
* </pre>
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Like Ajax
* Last Updated: $LastChangedDate: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
@@ -7,7 +7,7 @@
* $Author: mmecham $
* @since Friday 19th May 2006 17:33
* $LastChangedDate: 2011-05-03 04:53:04 -0400 (Tue, 03 May 2011) $
* @version v3.4.5
* @version v3.4.6
* $Revision: 8588 $
*/
@@ -1,111 +1,111 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* Login handler abstraction : AJAX UserCP functions
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @since Tuesday 1st March 2005 (11:52)
* @version $Revision: 10721 $
*
*/
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 public_core_ajax_usercp extends ipsAjaxCommand
{
/**
* Class entry point
*
* @param object Registry reference
* @return @e void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
switch( $this->request['do'] )
{
case 'displayNameCheck':
$this->displayNameCheck();
break;
}
}
/**
* Checks a display name
*
* @return @e void [Outputs JSON to browser AJAX call]
*/
protected function displayNameCheck()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$name = mb_strtolower( $this->convertAndMakeSafe( $this->request['name'], 0 ) );
$name = str_replace("&#43;", "+", $name );
$member = array();
$return = TRUE;
$id = intval( $this->request['member_id'] );
# Set member ID
$id = $this->memberData['member_id'] ? $this->memberData['member_id'] : $id;
//-----------------------------------------
// Load member if required
//-----------------------------------------
if ( $id != $this->memberData['member_id'] )
{
$member = IPSMember::load( $id, 'all' );
}
else
{
$member = $this->member->fetchMemberData();
}
//-----------------------------------------
// Test name
//-----------------------------------------
try
{
$return = IPSMember::getFunction()->checkNameExists( $name, $member );
}
catch( Exception $error )
{
$_msg = $error->getMessage();
if ( $_msg == 'NO_MORE_CHANGES' )
{
$this->returnString( 'nomorechanges' );
return;
}
# Really, we're not very interested why it didn't work at this point, so
# just return with a 'found' string which will make a nice red cross and
# force the user to choose another.
$this->returnString('found');
return;
}
//-----------------------------------------
// So, what's it to be?
//-----------------------------------------
$this->returnString( ( $return === TRUE ) ? 'found' : 'notfound' );
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.6
* Login handler abstraction : AJAX UserCP functions
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @since Tuesday 1st March 2005 (11:52)
* @version $Revision: 10721 $
*
*/
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 public_core_ajax_usercp extends ipsAjaxCommand
{
/**
* Class entry point
*
* @param object Registry reference
* @return @e void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
switch( $this->request['do'] )
{
case 'displayNameCheck':
$this->displayNameCheck();
break;
}
}
/**
* Checks a display name
*
* @return @e void [Outputs JSON to browser AJAX call]
*/
protected function displayNameCheck()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$name = strtolower( $this->convertAndMakeSafe( $this->request['name'], 0 ) );
$name = str_replace("&#43;", "+", $name );
$member = array();
$return = TRUE;
$id = intval( $this->request['member_id'] );
# Set member ID
$id = $this->memberData['member_id'] ? $this->memberData['member_id'] : $id;
//-----------------------------------------
// Load member if required
//-----------------------------------------
if ( $id != $this->memberData['member_id'] )
{
$member = IPSMember::load( $id, 'all' );
}
else
{
$member = $this->member->fetchMemberData();
}
//-----------------------------------------
// Test name
//-----------------------------------------
try
{
$return = IPSMember::getFunction()->checkNameExists( $name, $member );
}
catch( Exception $error )
{
$_msg = $error->getMessage();
if ( $_msg == 'NO_MORE_CHANGES' )
{
$this->returnString( 'nomorechanges' );
return;
}
# Really, we're not very interested why it didn't work at this point, so
# just return with a 'found' string which will make a nice red cross and
# force the user to choose another.
$this->returnString('found');
return;
}
//-----------------------------------------
// So, what's it to be?
//-----------------------------------------
$this->returnString( ( $return === TRUE ) ? 'found' : 'notfound' );
}
}
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Attachment Poster
* Last Updated: $Date: 2012-08-22 05:05:53 -0400 (Wed, 22 Aug 2012) $
* </pre>
@@ -7,7 +7,7 @@
* $Author: ips_terabyte $
* @since 20th February 2002
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
* @version v3.4.5
* @version v3.4.6
* $Revision: 8655 $
*/
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
IP.Board
</body>
</html>
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Captcha
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Image Ajax
* Last Updated: $LastChangedDate: 2012-10-03 17:32:06 -0400 (Wed, 03 Oct 2012) $
* </pre>
@@ -7,7 +7,7 @@
* $Author: ips_terabyte $
* @since 20th February 2002
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
* @version v3.4.5
* @version v3.4.6
* $Revision: 8655 $
*/
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
IP.Board
</body>
</html>
@@ -7,7 +7,7 @@
* $Author: AndyMillne $
* @since -
* $LastChangedDate: 2013-02-06 16:33:34 -0500 (Wed, 06 Feb 2013) $
* @version v3.4.5
* @version v3.4.6
* $Revision: 11947 $
*/
File diff suppressed because it is too large. Load diff
@@ -1,484 +1,484 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* Recover Lost Password
* Last Updated: $Date: 2012-11-28 04:54:58 -0500 (Wed, 28 Nov 2012) $
* </pre>
*
* @author $Author $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @since 20th February 2002
* @version $Rev: 11651 $
*
*/
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 public_core_global_lostpass extends ipsCommand
{
/**
* Class entry point
*
* @param object Registry reference
* @return @e void [Outputs to screen/redirects]
*/
public function doExecute( ipsRegistry $registry )
{
/* Load language */
$this->registry->class_localization->loadLanguageFile( array( 'public_register' ), 'core' );
//-----------------------------------------
// Meta tags
//-----------------------------------------
$this->registry->output->addMetaTag( 'robots', 'noindex' );
/* What to do */
switch( $this->request['do'] )
{
case 'sendform':
$this->lostPasswordValidateForm();
break;
case '11':
$this->lostPasswordEnd();
break;
case '03':
$this->lostPasswordValidate();
break;
default:
case '10':
$this->lostPasswordForm();
break;
}
/* Output */
$this->registry->output->addContent( $this->output );
$this->registry->output->sendOutput();
}
/**
* Validates a lost password request
*
* @return @e void
*/
public function lostPasswordValidate()
{
/* Check for input and it's in a valid format. */
$in_user_id = intval( trim( urldecode( $this->request['uid'] ) ) );
$in_validate_key = IPSText::md5Clean( trim( urldecode( $this->request['aid'] ) ) );
/* Check Input */
if( ! $in_validate_key )
{
$this->registry->output->showError( 'validation_key_incorrect', 1015 );
}
if( ! preg_match( '/^(?:\d){1,}$/', $in_user_id ) )
{
$this->registry->output->showError( 'uid_key_incorrect', 1016 );
}
/* Attempt to get the profile of the requesting user */
$member = IPSMember::load( $in_user_id );
if( ! $member['member_id'] )
{
$this->registry->output->showError( 'lostpass_no_member', 1017 );
}
/* Get validating info.. */
$validate = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'validating', 'where' => 'member_id=' . $in_user_id . ' and lost_pass=1' ) );
if( ! $validate['member_id'] )
{
$this->registry->output->showError( 'lostpass_not_validating', 1018 );
}
if( ( $validate['new_reg'] == 1 ) && ( $this->settings['reg_auth_type'] == "admin" ) )
{
$this->registry->output->showError( 'lostpass_new_reg', 4010, true );
}
if( $validate['vid'] != $in_validate_key )
{
$this->registry->output->showError( 'lostpass_key_wrong', 1019 );
}
else
{
/* On the same page? */
if( $validate['lost_pass'] != 1 )
{
$this->registry->output->showError( 'lostpass_not_lostpass', 4011, true );
}
/* Send a new random password? */
if( $this->settings['lp_method'] == 'random' )
{
//-----------------------------------------
// INIT
//-----------------------------------------
$save_array = array();
//-----------------------------------------
// Generate a new random password
//-----------------------------------------
$new_pass = IPSMember::makePassword();
//-----------------------------------------
// Generate a new salt
//-----------------------------------------
$salt = IPSMember::generatePasswordSalt(5);
$salt = str_replace( '\\', "\\\\", $salt );
//-----------------------------------------
// New log in key
//-----------------------------------------
$key = IPSMember::generateAutoLoginKey();
//-----------------------------------------
// Update...
//-----------------------------------------
$save_array['members_pass_salt'] = $salt;
$save_array['members_pass_hash'] = md5( md5($salt) . md5( $new_pass ) );
$save_array['member_login_key'] = $key;
$save_array['member_login_key_expire'] = $this->settings['login_key_expire'] * 60 * 60 * 24;
$save_array['failed_logins'] = null;
$save_array['failed_login_count'] = 0;
//-----------------------------------------
// Load handler...
//-----------------------------------------
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' );
$this->han_login = new $classToLoad( $this->registry );
$this->han_login->init();
$this->han_login->changePass( $member['email'], md5( $new_pass ), $new_pass, $member );
//if ( $this->han_login->return_code != 'METHOD_NOT_DEFINED' AND $this->han_login->return_code != 'SUCCESS' )
//{
// $this->registry->output->showError( $this->lang->words['lostpass_external_fail'], 2013 );
//}
IPSMember::save( $member['member_id'], array( 'members' => $save_array ) );
/* Password has been changed! */
IPSLib::runMemberSync( 'onPassChange', $member['member_id'], $new_pass );
//-----------------------------------------
// Send out the email...
//-----------------------------------------
$message = array( 'NAME' => $member['members_display_name'],
'THE_LINK' => $this->registry->getClass('output')->buildSEOUrl( 'app=core&module=usercp&tab=core&area=email', 'publicNoSession', 'flase' ),
'PASSWORD' => $new_pass,
'LOGIN' => $this->registry->getClass('output')->buildSEOUrl( 'app=core&module=global&section=login', 'publicNoSession', 'false' ),
'USERNAME' => $member['name'],
'EMAIL' => $member['email'],
'ID' => $member['member_id'] );
IPSText::getTextClass('email')->setPlainTextTemplate( IPSText::getTextClass('email')->getTemplate( "lost_pass_email_pass", $member['language'] ) );
IPSText::getTextClass('email')->buildPlainTextContent( $message );
IPSText::getTextClass('email')->buildHtmlContent( $message );
IPSText::getTextClass('email')->subject = $this->lang->words['lp_random_pass_subject'] . ' ' . $this->settings['board_name'];
IPSText::getTextClass('email')->to = $member['email'];
IPSText::getTextClass('email')->sendMail();
$this->registry->output->setTitle( $this->lang->words['activation_form'] . ' - ' . ipsRegistry::$settings['board_name'] );
$this->output = $this->registry->getClass('output')->getTemplate('register')->showLostPassWaitRandom( $member );
}
else
{
if( $_POST['pass1'] == "" )
{
$this->registry->output->showError( 'pass_blank', 10184 );
}
if( $_POST['pass2'] == "" )
{
$this->registry->output->showError( 'pass_blank', 10185 );
}
$pass_a = trim( $this->request['pass1'] );
$pass_b = trim( $this->request['pass2'] );
/*
There's no reason for this - http://community.invisionpower.com/resources/bugs.html/_/ip-board/registrations-limit-passwords-to-32-characters-for-no-apparent-reason-r37770
if( strlen( $pass_a ) < 3 )
{
$this->registry->output->showError( 'pass_too_short', 10186 );
}
*/
if( $pass_a != $pass_b )
{
$this->registry->output->showError( 'pass_no_match', 10187 );
}
$new_pass = md5( $pass_a );
/* Update Member Array */
$save_array = array();
/* Generate a new salt */
$salt = IPSMember::generatePasswordSalt(5);
$salt = str_replace( '\\', "\\\\", $salt );
/* New log in key */
$key = IPSMember::generateAutoLoginKey();
/* Update Array */
$save_array['members_pass_salt'] = $salt;
$save_array['members_pass_hash'] = md5( md5($salt) . $new_pass );
$save_array['member_login_key'] = $key;
$save_array['member_login_key_expire'] = $this->settings['login_key_expire'] * 60 * 60 * 24;
$save_array['failed_logins'] = null;
$save_array['failed_login_count'] = 0;
/* Change the password */
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' );
$this->han_login = new $classToLoad( $this->registry );
$this->han_login->init();
$this->han_login->changePass( $member['email'], $new_pass, $pass_a, $member );
//-----------------------------------------
// We'll ignore any remote errors
//-----------------------------------------
/*if( $this->han_login->return_code != 'METHOD_NOT_DEFINED' AND $this->han_login->return_code != 'SUCCESS' )
{
// Pass not changed remotely
}*/
/* Update the member */
IPSMember::save( $member['member_id'], array( 'members' => $save_array ) );
/* Password has been changed! */
IPSLib::runMemberSync( 'onPassChange', $member['member_id'], $pass_a );
/* Remove "dead" validation */
$this->DB->delete( 'validating', "vid='{$validate['vid']}' OR (member_id={$member['member_id']} AND lost_pass=1)" );
$this->registry->output->silentRedirect( $this->registry->getClass('output')->buildSEOUrl( 'app=core&module=global&section=login&do=autologin&frompass=1' ) );
}
}
}
/**
* Completes the lost password request form
*
* @return @e void
*/
public function lostPasswordEnd()
{
if( $this->settings['bot_antispam_type'] != 'none' )
{
if( !$this->registry->getClass('class_captcha')->validate( $this->request['regid'], $this->request['reg_code'] ) )
{
$this->lostPasswordForm( 'err_reg_code' );
return;
}
}
/* Back to the usual programming! :o */
if( $this->request['member_name'] == "" AND $this->request['email_addy'] == "" )
{
$this->registry->output->showError( 'lostpass_name_email', 10110 );
}
/* Check for input and it's in a valid format. */
$member_name = trim( mb_strtolower( $this->request['member_name'] ) );
$email_addy = trim( strtolower( $this->request['email_addy'] ) );
if( $member_name == "" AND $email_addy == "" )
{
$this->registry->output->showError( 'lostpass_name_email', 10111 );
}
/* Attempt to get the user details from the DB */
if( $member_name )
{
$this->DB->build( array( 'select' => 'members_display_name, name, member_id, email, member_group_id', 'from' => 'members', 'where' => "members_l_username='{$member_name}'" ) );
$this->DB->execute();
}
else if( $email_addy )
{
$this->DB->build( array( 'select' => 'members_display_name, name, member_id, email, member_group_id', 'from' => 'members', 'where' => "email='{$email_addy}'" ) );
$this->DB->execute();
}
if ( ! $this->DB->getTotalRows() )
{
$this->registry->output->showError( 'lostpass_no_user', 10112 );
}
else
{
$member = $this->DB->fetch();
/* Is there a validation key? If so, we'd better not touch it */
if( $member['member_id'] == "" )
{
$this->registry->output->showError( 'lostpass_no_mid', 2014 );
}
$validate_key = md5( IPSMember::makePassword() . uniqid( mt_rand(), TRUE ) );
/* Get rid of old entries for this member */
$this->DB->delete( 'validating', "member_id={$member['member_id']} AND lost_pass=1" );
/* Update the DB for this member. */
$db_str = array('vid' => $validate_key,
'member_id' => $member['member_id'],
'temp_group' => $member['member_group_id'],
'entry_date' => time(),
'coppa_user' => 0,
'lost_pass' => 1,
'ip_address' => $this->member->ip_address,
);
/* Are they already in the validating group? */
if( $member['member_group_id'] != $this->settings['auth_group'] )
{
$db_str['real_group'] = $member['member_group_id'];
}
$this->DB->insert( 'validating', $db_str );
/* Send out the email. */
$message = array( 'USERNAME' => $member['name'],
'NAME' => $member['members_display_name'],
'THE_LINK' => $this->registry->getClass('output')->buildSEOUrl( "app=core&module=global&section=lostpass&do=sendform&uid={$member['member_id']}&aid={$validate_key}", 'publicNoSession', 'false' ),
'MAN_LINK' => $this->registry->getClass('output')->buildSEOUrl( 'app=core&module=global&section=lostpass&do=sendform', 'publicNoSession', 'false' ),
'EMAIL' => $member['email'],
'ID' => $member['member_id'],
'CODE' => $validate_key,
'IP_ADDRESS' => $this->member->ip_address );
IPSText::getTextClass('email')->setPlainTextTemplate( IPSText::getTextClass('email')->getTemplate( "lost_pass", $member['language'] ) );
IPSText::getTextClass('email')->buildPlainTextContent( $message );
IPSText::getTextClass('email')->buildHtmlContent( $message );
IPSText::getTextClass('email')->subject = $this->lang->words['lp_subject'] . ' ' . $this->settings['board_name'];
IPSText::getTextClass('email')->to = $member['email'];
IPSText::getTextClass('email')->sendMail();
$this->output = $this->registry->getClass('output')->getTemplate('register')->lostPasswordWait( $member );
}
$this->registry->output->setTitle( $this->lang->words['lost_pass_form'] . ' - ' . ipsRegistry::$settings['board_name'] );
}
/**
* Displays the lost password form
*
* @param string $errors
* @return @e void
*/
public function lostPasswordForm( $errors="" )
{
//-----------------------------------------
// Do we have another URL for password resets?
//-----------------------------------------
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' );
$han_login = new $classToLoad( $this->registry );
$han_login->init();
$han_login->checkMaintenanceRedirect();
/* CAPTCHA */
if( $this->settings['bot_antispam_type'] != 'none' )
{
$captchaHTML = $this->registry->getClass('class_captcha')->getTemplate();
}
$this->registry->output->setTitle( $this->lang->words['lost_pass_form'] . ' - ' . ipsRegistry::$settings['board_name'] );
$this->registry->output->addNavigation( $this->lang->words['lost_pass_form'], '' );
$this->output .= $this->registry->output->getTemplate('register')->lostPasswordForm( $this->lang->words[ $errors ] );
if ( $this->settings['bot_antispam_type'] != 'none' )
{
$this->output = str_replace( "<!--{REG.ANTISPAM}-->", $captchaHTML, $this->output );
}
}
/**
* Shows the form for validating a lost password request
*
* @param string $msg
* @return @e void
*/
public function lostPasswordValidateForm( $msg='' )
{
$this->output .= $this->registry->getClass('output')->getTemplate('register')->showLostpassForm( $this->lang->words[$msg] );
/* Check for input and it's in a valid format. */
if( $this->request['uid'] AND $this->request['aid'] )
{
$in_user_id = intval( trim( urldecode( $this->request['uid'] ) ) );
$in_validate_key = IPSText::md5Clean( trim( urldecode( $this->request['aid'] ) ) );
$in_type = trim( $this->request['type'] );
if ($in_type == "")
{
$in_type = 'reg';
}
/* Check and test input */
if ( ! $in_validate_key )
{
$this->registry->output->showError( 'validation_key_incorrect', 10113 );
}
if (! preg_match( '/^(?:\d){1,}$/', $in_user_id ) )
{
$this->registry->output->showError( 'uid_key_incorrect', 10114 );
}
/* Attempt to get the profile of the requesting user */
$member = IPSMember::load( $in_user_id );
if( ! $member['member_id'] )
{
$this->registry->output->showError( 'lostpass_no_member', 10115 );
}
/* Get validating info.. */
$validate = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'validating', 'where' => "member_id={$in_user_id} and vid='{$in_validate_key}' and lost_pass=1" ) );
if( ! $validate['member_id'] )
{
$this->registry->output->showError( 'validation_key_incorrect', 10116 );
}
$this->output = str_replace( "<!--IBF.INPUT_TYPE-->", $this->registry->output->getTemplate('register')->show_lostpass_form_auto( $in_validate_key, $in_user_id ), $this->output );
}
else
{
$this->output = str_replace( "<!--IBF.INPUT_TYPE-->", $this->registry->output->getTemplate('register')->show_lostpass_form_manual(), $this->output );
}
$this->registry->output->setTitle( $this->lang->words['activation_form'] . ' - ' . ipsRegistry::$settings['board_name'] );
$this->registry->output->addNavigation( $this->lang->words['activation_form'], '' );
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.6
* Recover Lost Password
* Last Updated: $Date: 2012-11-28 04:54:58 -0500 (Wed, 28 Nov 2012) $
* </pre>
*
* @author $Author $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @since 20th February 2002
* @version $Rev: 11651 $
*
*/
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 public_core_global_lostpass extends ipsCommand
{
/**
* Class entry point
*
* @param object Registry reference
* @return @e void [Outputs to screen/redirects]
*/
public function doExecute( ipsRegistry $registry )
{
/* Load language */
$this->registry->class_localization->loadLanguageFile( array( 'public_register' ), 'core' );
//-----------------------------------------
// Meta tags
//-----------------------------------------
$this->registry->output->addMetaTag( 'robots', 'noindex' );
/* What to do */
switch( $this->request['do'] )
{
case 'sendform':
$this->lostPasswordValidateForm();
break;
case '11':
$this->lostPasswordEnd();
break;
case '03':
$this->lostPasswordValidate();
break;
default:
case '10':
$this->lostPasswordForm();
break;
}
/* Output */
$this->registry->output->addContent( $this->output );
$this->registry->output->sendOutput();
}
/**
* Validates a lost password request
*
* @return @e void
*/
public function lostPasswordValidate()
{
/* Check for input and it's in a valid format. */
$in_user_id = intval( trim( urldecode( $this->request['uid'] ) ) );
$in_validate_key = IPSText::md5Clean( trim( urldecode( $this->request['aid'] ) ) );
/* Check Input */
if( ! $in_validate_key )
{
$this->registry->output->showError( 'validation_key_incorrect', 1015 );
}
if( ! preg_match( '/^(?:\d){1,}$/', $in_user_id ) )
{
$this->registry->output->showError( 'uid_key_incorrect', 1016 );
}
/* Attempt to get the profile of the requesting user */
$member = IPSMember::load( $in_user_id );
if( ! $member['member_id'] )
{
$this->registry->output->showError( 'lostpass_no_member', 1017 );
}
/* Get validating info.. */
$validate = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'validating', 'where' => 'member_id=' . $in_user_id . ' and lost_pass=1' ) );
if( ! $validate['member_id'] )
{
$this->registry->output->showError( 'lostpass_not_validating', 1018 );
}
if( ( $validate['new_reg'] == 1 ) && ( $this->settings['reg_auth_type'] == "admin" ) )
{
$this->registry->output->showError( 'lostpass_new_reg', 4010, true );
}
if( $validate['vid'] != $in_validate_key )
{
$this->registry->output->showError( 'lostpass_key_wrong', 1019 );
}
else
{
/* On the same page? */
if( $validate['lost_pass'] != 1 )
{
$this->registry->output->showError( 'lostpass_not_lostpass', 4011, true );
}
/* Send a new random password? */
if( $this->settings['lp_method'] == 'random' )
{
//-----------------------------------------
// INIT
//-----------------------------------------
$save_array = array();
//-----------------------------------------
// Generate a new random password
//-----------------------------------------
$new_pass = IPSMember::makePassword();
//-----------------------------------------
// Generate a new salt
//-----------------------------------------
$salt = IPSMember::generatePasswordSalt(5);
$salt = str_replace( '\\', "\\\\", $salt );
//-----------------------------------------
// New log in key
//-----------------------------------------
$key = IPSMember::generateAutoLoginKey();
//-----------------------------------------
// Update...
//-----------------------------------------
$save_array['members_pass_salt'] = $salt;
$save_array['members_pass_hash'] = md5( md5($salt) . md5( $new_pass ) );
$save_array['member_login_key'] = $key;
$save_array['member_login_key_expire'] = $this->settings['login_key_expire'] * 60 * 60 * 24;
$save_array['failed_logins'] = null;
$save_array['failed_login_count'] = 0;
//-----------------------------------------
// Load handler...
//-----------------------------------------
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' );
$this->han_login = new $classToLoad( $this->registry );
$this->han_login->init();
$this->han_login->changePass( $member['email'], md5( $new_pass ), $new_pass, $member );
//if ( $this->han_login->return_code != 'METHOD_NOT_DEFINED' AND $this->han_login->return_code != 'SUCCESS' )
//{
// $this->registry->output->showError( $this->lang->words['lostpass_external_fail'], 2013 );
//}
IPSMember::save( $member['member_id'], array( 'members' => $save_array ) );
/* Password has been changed! */
IPSLib::runMemberSync( 'onPassChange', $member['member_id'], $new_pass );
//-----------------------------------------
// Send out the email...
//-----------------------------------------
$message = array( 'NAME' => $member['members_display_name'],
'THE_LINK' => $this->registry->getClass('output')->buildUrl( 'app=core&module=usercp&tab=core&area=email', 'publicNoSession' ),
'PASSWORD' => $new_pass,
'LOGIN' => $this->registry->getClass('output')->buildUrl( 'app=core&module=global&section=login', 'publicNoSession' ),
'USERNAME' => $member['name'],
'EMAIL' => $member['email'],
'ID' => $member['member_id'] );
IPSText::getTextClass('email')->setPlainTextTemplate( IPSText::getTextClass('email')->getTemplate( "lost_pass_email_pass", $member['language'] ) );
IPSText::getTextClass('email')->buildPlainTextContent( $message );
IPSText::getTextClass('email')->buildHtmlContent( $message );
IPSText::getTextClass('email')->subject = $this->lang->words['lp_random_pass_subject'] . ' ' . $this->settings['board_name'];
IPSText::getTextClass('email')->to = $member['email'];
IPSText::getTextClass('email')->sendMail();
$this->registry->output->setTitle( $this->lang->words['activation_form'] . ' - ' . ipsRegistry::$settings['board_name'] );
$this->output = $this->registry->getClass('output')->getTemplate('register')->showLostPassWaitRandom( $member );
}
else
{
if( $_POST['pass1'] == "" )
{
$this->registry->output->showError( 'pass_blank', 10184 );
}
if( $_POST['pass2'] == "" )
{
$this->registry->output->showError( 'pass_blank', 10185 );
}
$pass_a = trim( $this->request['pass1'] );
$pass_b = trim( $this->request['pass2'] );
/*
There's no reason for this - http://community.invisionpower.com/resources/bugs.html/_/ip-board/registrations-limit-passwords-to-32-characters-for-no-apparent-reason-r37770
if( strlen( $pass_a ) < 3 )
{
$this->registry->output->showError( 'pass_too_short', 10186 );
}
*/
if( $pass_a != $pass_b )
{
$this->registry->output->showError( 'pass_no_match', 10187 );
}
$new_pass = md5( $pass_a );
/* Update Member Array */
$save_array = array();
/* Generate a new salt */
$salt = IPSMember::generatePasswordSalt(5);
$salt = str_replace( '\\', "\\\\", $salt );
/* New log in key */
$key = IPSMember::generateAutoLoginKey();
/* Update Array */
$save_array['members_pass_salt'] = $salt;
$save_array['members_pass_hash'] = md5( md5($salt) . $new_pass );
$save_array['member_login_key'] = $key;
$save_array['member_login_key_expire'] = $this->settings['login_key_expire'] * 60 * 60 * 24;
$save_array['failed_logins'] = null;
$save_array['failed_login_count'] = 0;
/* Change the password */
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' );
$this->han_login = new $classToLoad( $this->registry );
$this->han_login->init();
$this->han_login->changePass( $member['email'], $new_pass, $pass_a, $member );
//-----------------------------------------
// We'll ignore any remote errors
//-----------------------------------------
/*if( $this->han_login->return_code != 'METHOD_NOT_DEFINED' AND $this->han_login->return_code != 'SUCCESS' )
{
// Pass not changed remotely
}*/
/* Update the member */
IPSMember::save( $member['member_id'], array( 'members' => $save_array ) );
/* Password has been changed! */
IPSLib::runMemberSync( 'onPassChange', $member['member_id'], $pass_a );
/* Remove "dead" validation */
$this->DB->delete( 'validating', "vid='{$validate['vid']}' OR (member_id={$member['member_id']} AND lost_pass=1)" );
$this->registry->output->silentRedirect( $this->registry->getClass('output')->buildUrl( 'app=core&module=global&section=login&do=autologin&frompass=1' ) );
}
}
}
/**
* Completes the lost password request form
*
* @return @e void
*/
public function lostPasswordEnd()
{
if( $this->settings['bot_antispam_type'] != 'none' )
{
if( !$this->registry->getClass('class_captcha')->validate( $this->request['regid'], $this->request['reg_code'] ) )
{
$this->lostPasswordForm( 'err_reg_code' );
return;
}
}
/* Back to the usual programming! :o */
if( $this->request['member_name'] == "" AND $this->request['email_addy'] == "" )
{
$this->registry->output->showError( 'lostpass_name_email', 10110 );
}
/* Check for input and it's in a valid format. */
$member_name = trim( strtolower( $this->request['member_name'] ) );
$email_addy = trim( strtolower( $this->request['email_addy'] ) );
if( $member_name == "" AND $email_addy == "" )
{
$this->registry->output->showError( 'lostpass_name_email', 10111 );
}
/* Attempt to get the user details from the DB */
if( $member_name )
{
$this->DB->build( array( 'select' => 'members_display_name, name, member_id, email, member_group_id', 'from' => 'members', 'where' => "members_l_username='{$member_name}'" ) );
$this->DB->execute();
}
else if( $email_addy )
{
$this->DB->build( array( 'select' => 'members_display_name, name, member_id, email, member_group_id', 'from' => 'members', 'where' => "email='{$email_addy}'" ) );
$this->DB->execute();
}
if ( ! $this->DB->getTotalRows() )
{
$this->registry->output->showError( 'lostpass_no_user', 10112 );
}
else
{
$member = $this->DB->fetch();
/* Is there a validation key? If so, we'd better not touch it */
if( $member['member_id'] == "" )
{
$this->registry->output->showError( 'lostpass_no_mid', 2014 );
}
$validate_key = md5( IPSMember::makePassword() . uniqid( mt_rand(), TRUE ) );
/* Get rid of old entries for this member */
$this->DB->delete( 'validating', "member_id={$member['member_id']} AND lost_pass=1" );
/* Update the DB for this member. */
$db_str = array('vid' => $validate_key,
'member_id' => $member['member_id'],
'temp_group' => $member['member_group_id'],
'entry_date' => time(),
'coppa_user' => 0,
'lost_pass' => 1,
'ip_address' => $this->member->ip_address,
);
/* Are they already in the validating group? */
if( $member['member_group_id'] != $this->settings['auth_group'] )
{
$db_str['real_group'] = $member['member_group_id'];
}
$this->DB->insert( 'validating', $db_str );
/* Send out the email. */
$message = array( 'USERNAME' => $member['name'],
'NAME' => $member['members_display_name'],
'THE_LINK' => $this->registry->getClass('output')->buildUrl( "app=core&module=global&section=lostpass&do=sendform&uid={$member['member_id']}&aid={$validate_key}", 'publicNoSession' ),
'MAN_LINK' => $this->registry->getClass('output')->buildUrl( 'app=core&module=global&section=lostpass&do=sendform', 'publicNoSession' ),
'EMAIL' => $member['email'],
'ID' => $member['member_id'],
'CODE' => $validate_key,
'IP_ADDRESS' => $this->member->ip_address );
IPSText::getTextClass('email')->setPlainTextTemplate( IPSText::getTextClass('email')->getTemplate( "lost_pass", $member['language'] ) );
IPSText::getTextClass('email')->buildPlainTextContent( $message );
IPSText::getTextClass('email')->buildHtmlContent( $message );
IPSText::getTextClass('email')->subject = $this->lang->words['lp_subject'] . ' ' . $this->settings['board_name'];
IPSText::getTextClass('email')->to = $member['email'];
IPSText::getTextClass('email')->sendMail();
$this->output = $this->registry->getClass('output')->getTemplate('register')->lostPasswordWait( $member );
}
$this->registry->output->setTitle( $this->lang->words['lost_pass_form'] . ' - ' . ipsRegistry::$settings['board_name'] );
}
/**
* Displays the lost password form
*
* @param string $errors
* @return @e void
*/
public function lostPasswordForm( $errors="" )
{
//-----------------------------------------
// Do we have another URL for password resets?
//-----------------------------------------
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' );
$han_login = new $classToLoad( $this->registry );
$han_login->init();
$han_login->checkMaintenanceRedirect();
/* CAPTCHA */
if( $this->settings['bot_antispam_type'] != 'none' )
{
$captchaHTML = $this->registry->getClass('class_captcha')->getTemplate();
}
$this->registry->output->setTitle( $this->lang->words['lost_pass_form'] . ' - ' . ipsRegistry::$settings['board_name'] );
$this->registry->output->addNavigation( $this->lang->words['lost_pass_form'], '' );
$this->output .= $this->registry->output->getTemplate('register')->lostPasswordForm( $this->lang->words[ $errors ] );
if ( $this->settings['bot_antispam_type'] != 'none' )
{
$this->output = str_replace( "<!--{REG.ANTISPAM}-->", $captchaHTML, $this->output );
}
}
/**
* Shows the form for validating a lost password request
*
* @param string $msg
* @return @e void
*/
public function lostPasswordValidateForm( $msg='' )
{
$this->output .= $this->registry->getClass('output')->getTemplate('register')->showLostpassForm( $this->lang->words[$msg] );
/* Check for input and it's in a valid format. */
if( $this->request['uid'] AND $this->request['aid'] )
{
$in_user_id = intval( trim( urldecode( $this->request['uid'] ) ) );
$in_validate_key = IPSText::md5Clean( trim( urldecode( $this->request['aid'] ) ) );
$in_type = trim( $this->request['type'] );
if ($in_type == "")
{
$in_type = 'reg';
}
/* Check and test input */
if ( ! $in_validate_key )
{
$this->registry->output->showError( 'validation_key_incorrect', 10113 );
}
if (! preg_match( '/^(?:\d){1,}$/', $in_user_id ) )
{
$this->registry->output->showError( 'uid_key_incorrect', 10114 );
}
/* Attempt to get the profile of the requesting user */
$member = IPSMember::load( $in_user_id );
if( ! $member['member_id'] )
{
$this->registry->output->showError( 'lostpass_no_member', 10115 );
}
/* Get validating info.. */
$validate = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'validating', 'where' => "member_id={$in_user_id} and vid='{$in_validate_key}' and lost_pass=1" ) );
if( ! $validate['member_id'] )
{
$this->registry->output->showError( 'validation_key_incorrect', 10116 );
}
$this->output = str_replace( "<!--IBF.INPUT_TYPE-->", $this->registry->output->getTemplate('register')->show_lostpass_form_auto( $in_validate_key, $in_user_id ), $this->output );
}
else
{
$this->output = str_replace( "<!--IBF.INPUT_TYPE-->", $this->registry->output->getTemplate('register')->show_lostpass_form_manual(), $this->output );
}
$this->registry->output->setTitle( $this->lang->words['activation_form'] . ' - ' . ipsRegistry::$settings['board_name'] );
$this->registry->output->addNavigation( $this->lang->words['activation_form'], '' );
}
}
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Captcha
* Last Updated: $Date: 2013-04-16 15:13:53 -0400 (Tue, 16 Apr 2013) $
* </pre>
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Show forum rules
* Last Updated: $Date: 2011-05-05 12:03:47 +0100 (Thu, 05 May 2011) $
* </pre>
@@ -2,9 +2,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Register
* Last Updated: $Date: 2013-05-03 23:09:37 -0400 (Fri, 03 May 2013) $
* Last Updated: $Date: 2013-10-24 08:12:23 -0400 (Thu, 24 Oct 2013) $
* </pre>
*
* @author $Author $
@@ -14,7 +14,7 @@
* @subpackage Core
* @link http://www.invisionpower.com
* @since 20th February 2002
* @version $Rev: 12226 $
* @version $Rev: 12391 $
*
*/
@@ -111,7 +111,7 @@ class public_core_global_register extends ipsCommand
/* Output */
$this->registry->output->addContent( $this->output );
$this->registry->output->sendOutput();
$this->registry->output->sendOutput();
}
/**
@@ -250,7 +250,7 @@ class public_core_global_register extends ipsCommand
//-----------------------------------------
if ( !$nexusError and $this->request['nexus_pass'] )
{
{
//-----------------------------------------
// Did we buy a package?
//-----------------------------------------
@@ -408,10 +408,10 @@ class public_core_global_register extends ipsCommand
$ftype = 'optional';
}
$custom_fields_out[$ftype][] = array(
'name' => $custom_fields->field_names[ $id ],
'desc' => $custom_fields->field_desc[ $id ],
'field' => $form_element,
$custom_fields_out[$ftype][] = array(
'name' => $custom_fields->field_names[ $id ],
'desc' => $custom_fields->field_desc[ $id ],
'field' => $form_element,
'id' => $id,
'error' => '',
'type' => $custom_fields->cache_data[ $id ]['pf_type']
@@ -495,14 +495,14 @@ class public_core_global_register extends ipsCommand
$this->output .= $this->registry->output->getTemplate('register')->registerForm(
$form_errors['general'],
array(
'TEXT' => $this->lang->words['std_text'],
array(
'TEXT' => $this->lang->words['std_text'],
'coppa_user' => $coppa,
'captchaHTML' => $captchaHTML,
'qandaHTML' => $qandaHTML,
'showCOPPA' => $this->settings['use_coppa'] AND !(IPSLib::appIsInstalled('nexus') AND $this->settings['nexus_reg_show'] AND $this->settings['nexus_store_online']),
),
$final_errors,
),
$final_errors,
$time_select,
$custom_fields_out,
$nexusFields,
@@ -534,6 +534,7 @@ class public_core_global_register extends ipsCommand
$login_user = trim( $this->request['login_user'] );
$login_pass = trim( $this->request['login_pass'] );
$connectService = trim( strtolower( $this->request['connectService'] ) );
$validate_key = md5( IPSMember::makePassword() . time() );
//-----------------------------------------
// Get DB row
@@ -651,24 +652,6 @@ class public_core_global_register extends ipsCommand
$form_errors['serviceLogIn'][] = $this->lang->words['connect_unknown'];
}
}
else if ( $connectService == 'vkontakte' AND $member['vk_uid'] )
{
/* Already VKd? */
if ( $logInMember['vk_uid'] AND ( $member['vk_uid'] != $logInMember['vk_uid'] ) )
{
/* User already has vkontakte link */
$form_errors['serviceLogIn'][] = sprintf( $this->lang->words['connect_already_linked'], $login_user, ucfirst( $connectService ) );
}
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/vkontakte/connect.php', 'vkontakte_connect' );
$vk = new $classToLoad( $this->registry, $key );
if ( $vk->finishNewConnection( $logInMember['member_id'], $member['member_id'] ) !== true )
{
/* Unknown error */
$form_errors['serviceLogIn'][] = $this->lang->words['connect_unknown'];
}
}
/* Ok to proceed? */
if ( ! count( $form_errors['serviceLogIn'] ) )
@@ -783,18 +766,18 @@ class public_core_global_register extends ipsCommand
'name' => $tmp_member['name'] ? $tmp_member['name'] : $members_display_name,
'members_l_username' => $tmp_member['members_l_username'] ? $tmp_member['members_l_username'] : $members_display_name,
'member_group_id' => $member_group_id,
'members_l_display_name' => strtolower( $members_display_name )
'members_l_display_name' => strtolower( $members_display_name )
) ) );
}
else
{
IPSMember::save( $mid, array( 'members' => array(
IPSMember::save( $mid, array( 'members' => array(
'members_display_name' => $members_display_name,
'members_seo_name' => IPSText::makeSeoTitle( $members_display_name ),
'name' => $tmp_member['name'] ? $tmp_member['name'] : $members_display_name,
'members_l_username' => $tmp_member['members_l_username'] ? $tmp_member['members_l_username'] : $members_display_name,
'member_group_id' => $member_group_id,
'members_l_display_name' => mb_strtolower( $members_display_name )
'members_l_display_name' => strtolower( $members_display_name )
) ) );
}
@@ -814,77 +797,6 @@ class public_core_global_register extends ipsCommand
if ( is_array($custom_fields->out_fields) and count($custom_fields->out_fields) )
{
$this->DB->update( 'pfields_content', $custom_fields->out_fields, 'member_id=' . $mid );
}
//-----------------------------------------
// Pass twitter/facebook via spam service
//-----------------------------------------
if ( $connectService AND ! $login_user AND $this->settings['spam_service_enabled'] )
{
/* Load all member data */
$member = IPSMember::load( $mid, 'all' );
/* Spam Service */
$spamCode = 0;
$_spamFlag = 0;
/* Query the service */
$spamCode = IPSMember::querySpamService( $member['email'] );
/* Action to perform */
$action = $this->settings[ 'spam_service_action_' . $spamCode ];
/* Perform Action */
switch( $action )
{
/* Proceed with registration */
case 1:
break;
/* Flag for admin approval */
case 2:
$member['member_group_id'] = $this->settings['auth_group'];
$this->settings['reg_auth_type'] = 'admin';
$_spamFlag = 1;
break;
/* Approve the account, but ban it */
case 3:
$member['member_banned'] = 1;
$member['bw_is_spammer'] = 1;
$this->settings['reg_auth_type'] = '';
break;
/* Deny registration */
case 4:
$this->registry->output->showError( 'spam_denied_account', '100x001', FALSE, '', 200 );
break;
}
/* Update member */
IPSMember::save( $member['member_id'], array( 'core' => array( 'member_group_id' => $member['member_group_id'],
'member_banned' => intval( $member['member_banned'] ),
'bw_is_spammer' => intval( $member['bw_is_spammer'] ) ) ) );
/* Did we put them in validating? */
if ( $_spamFlag )
{
$validate_key = md5( IPSMember::makePassword() . time() );
$time = time();
$this->DB->insert( 'validating', array( 'vid' => $validate_key,
'member_id' => $member['member_id'],
'real_group' => $this->settings['member_group'],
'temp_group' => $this->settings['auth_group'],
'entry_date' => $time,
'coppa_user' => 0,
'new_reg' => 1,
'ip_address' => $member['ip_address'],
'spam_flag' => $_spamFlag ) );
$this->output = $this->registry->output->getTemplate('register')->showPreview( $member );
return; #Goes back to doExecute which sends $this->output to output class
}
}
/* Send out notification */
@@ -946,6 +858,7 @@ class public_core_global_register extends ipsCommand
'entry_date' => time(),
'coppa_user' => 0,
'new_reg' => 1,
'user_verified' => 1,
'ip_address' => $member['ip_address'],
'spam_flag' => $_spamFlag ) );
@@ -1043,7 +956,7 @@ class public_core_global_register extends ipsCommand
/* Now, make sure we have a unique display name */
$max = $this->DB->buildAndFetch( array( 'select' => 'MAX(member_id) as max',
'from' => 'members',
'where' => "members_l_display_name LIKE '" . $this->DB->addSlashes( mb_strtolower( $userData['_displayName'] ) ) . "%'" ) );
'where' => "members_l_display_name LIKE '" . $this->DB->addSlashes( strtolower( $userData['_displayName'] ) ) . "%'" ) );
if ( $max['max'] )
{
@@ -1077,22 +990,6 @@ class public_core_global_register extends ipsCommand
$userData['_sImage'] = $this->settings['public_dir'] . 'style_status/twitter.png';
}
}
else if ( $member['vk_uid'] AND $member['vk_token'] )
{
/* Attempt to fetch user details */
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/vkontakte/connect.php', 'vkontakte_connect' );
$vk = new $classToLoad( $this->registry, $member['vk_token'], $member['vk_uid'] );
$userData = $vk->fetchUserData();
if ( $userData['uid'] )
{
$userData['service'] = 'vkontakte';
$userData['_name'] = $userData['first_name'] . ' ' . $userData['last_name'];
$userData['_pic'] = $userData['photo'];
$userData['_sImage'] = $this->settings['public_dir'] . 'style_status/vkontakte.png';
}
}
else
{
/* Set defaults for any we have */
@@ -1145,10 +1042,10 @@ class public_core_global_register extends ipsCommand
$ftype = 'optional';
}
$custom_fields_out[$ftype][] = array(
'name' => $custom_fields->field_names[ $id ],
'desc' => $custom_fields->field_desc[ $id ],
'field' => $form_element,
$custom_fields_out[$ftype][] = array(
'name' => $custom_fields->field_names[ $id ],
'desc' => $custom_fields->field_desc[ $id ],
'field' => $form_element,
'id' => $id,
'error' => '',
'type' => $custom_fields->cache_data[ $id ]['pf_type']
@@ -1290,8 +1187,8 @@ class public_core_global_register extends ipsCommand
IPSText::getTextClass('email')->buildMessage( array(
'NAME' => $member['members_display_name'],
'THE_LINK' => $this->registry->getClass('output')->buildSEOUrl("app=core&module=global&section=lostpass&do=sendform&uid=" . $member['member_id'] . "&aid=" . $val['vid'], 'publicNoSession', 'false'),
'MAN_LINK' => $this->registry->getClass('output')->buildSEOUrl("app=core&module=global&section=lostpass&do=sendform", 'publicNoSession', 'false'),
'THE_LINK' => $this->settings['base_url'] . "app=core&module=global&section=lostpass&do=sendform&uid=" . $member['member_id'] . "&aid=" . $val['vid'],
'MAN_LINK' => $this->settings['base_url'] . "app=core&module=global&section=lostpass&do=sendform",
'EMAIL' => $member['email'],
'ID' => $member['member_id'],
'CODE' => $val['vid'],
@@ -1309,9 +1206,9 @@ class public_core_global_register extends ipsCommand
IPSText::getTextClass('email')->getTemplate( "reg_validate", $member['language'] );
IPSText::getTextClass('email')->buildMessage( array(
'THE_LINK' => $this->registry->getClass('output')->buildSEOUrl( "app=core&module=global&section=register&do=auto_validate&uid=" . $member['member_id'] . "&aid=" . $val['vid'], 'publicNoSession', 'false'),
'THE_LINK' => $this->settings['base_url'] . "app=core&module=global&section=register&do=auto_validate&uid=" . $member['member_id'] . "&aid=" . $val['vid'],
'NAME' => $member['members_display_name'],
'MAN_LINK' => $this->registry->getClass('output')->buildSEOUrl("app=core&module=global&section=register&do=05", 'publicNoSession', 'false'),
'MAN_LINK' => $this->settings['base_url'] . "app=core&module=global&section=register&do=05",
'EMAIL' => $member['email'],
'ID' => $member['member_id'],
'CODE' => $val['vid'],
@@ -1329,9 +1226,9 @@ class public_core_global_register extends ipsCommand
IPSText::getTextClass('email')->buildMessage( array(
'NAME' => $member['members_display_name'],
'THE_LINK' => $this->registry->getClass('output')->buildSEOUrl("app=core&module=global&section=register&do=auto_validate&type=newemail&uid=" . $member['member_id'] . "&aid=" . $val['vid'], 'publicNoSession', 'false'),
'THE_LINK' => $this->settings['base_url'] . "app=core&module=global&section=register&do=auto_validate&type=newemail&uid=" . $member['member_id'] . "&aid=" . $val['vid'],
'ID' => $member['member_id'],
'MAN_LINK' => $this->registry->getClass('output')->buildSEOUrl("app=core&module=global&section=register&do=07", 'publicNoSession', 'false'),
'MAN_LINK' => $this->settings['base_url'] . "app=core&module=global&section=register&do=07",
'CODE' => $val['vid'],
)
);
@@ -1394,7 +1291,7 @@ class public_core_global_register extends ipsCommand
echo( $this->registry->output->getTemplate('register')->registerCoppaForm() );
exit();
}
}
/**
* This is the second page a COPPA submission hits. Really, user hits this page and if birthday is older than 13
@@ -1405,7 +1302,8 @@ class public_core_global_register extends ipsCommand
*/
protected function registerCoppaTwo()
{
if( $this->request['coppa'] == 1 )
$birthday = strtotime( $this->request['month'] ."-" . $this->request['day'] . "-" . $this->request['year']);
if( time() - ( $birthday + ( 60 * 60 * 24 * 365 * 13 ) ) > 0 )
{
IPSCookie::set( 'coppa', 'no', 0, 1 );
$this->registerForm();
@@ -1420,7 +1318,7 @@ class public_core_global_register extends ipsCommand
$this->registry->output->setTitle( $this->lang->words['coppa_title'] . ' - ' . ipsRegistry::$settings['board_name']);
$this->registry->output->addNavigation( $this->lang->words['coppa_title'], '' );
}
}
/**
* Validation completion. This is the action hit when a user clicks a validation link from their email for
@@ -1482,10 +1380,10 @@ class public_core_global_register extends ipsCommand
// account for a spam user too
//-----------------------------------------
if ( ( $validate['new_reg'] == 1 ) && (($this->settings['reg_auth_type'] == "admin" ) || $validate['spam_flag']) )
{
if ( ( $validate['new_reg'] == 1 ) && (($this->settings['reg_auth_type'] == "admin" ) || $validate['spam_flag']) )
{
$this->registry->output->showError( 'validate_admin_turn', 10121 );
}
}
if ( $validate['vid'] != $in_validate_key )
{
@@ -1646,9 +1544,9 @@ class public_core_global_register extends ipsCommand
IPSText::getTextClass('email')->buildMessage( array(
'NAME' => $member['members_display_name'],
'THE_LINK' => $this->registry->getClass('output')->buildSEOUrl('app=core&module=usercp&tab=core&area=email', 'publicNoSession', 'false'),
'THE_LINK' => $this->settings['base_url'] . 'app=core&module=usercp&tab=core&area=email',
'PASSWORD' => $new_pass,
'LOGIN' => $this->registry->getClass('output')->buildSEOUrl('app=core&module=global&section=login', 'publicNoSession', 'false'),
'LOGIN' => $this->settings['base_url'] . 'app=core&module=global&section=login',
'USERNAME' => $member['name'],
'EMAIL' => $member['email'],
'ID' => $member['member_id'],
@@ -1726,7 +1624,7 @@ class public_core_global_register extends ipsCommand
$custom_fields = new $classToLoad();
$custom_fields->initData( 'edit' );
$custom_fields->parseToSave( $_POST, 'register' );
$custom_fields->parseToSave( $_POST, 'register' );
/* Check */
if( $custom_fields->error_messages )
@@ -1734,7 +1632,7 @@ class public_core_global_register extends ipsCommand
$form_errors['general'] = $custom_fields->error_messages;
}
/* Check the email address */
/* Check the email address */
if ( ! $in_email OR strlen( $in_email ) < 6 OR !IPSText::checkEmailAddress( $in_email ) )
{
$form_errors['email'][$this->lang->words['err_invalid_email']] = $this->lang->words['err_invalid_email'];
@@ -1829,7 +1727,7 @@ class public_core_global_register extends ipsCommand
{
$answer = trim($answer);
if( IPSText::mbstrlen($answer) AND mb_strtolower($answer) == mb_strtolower($this->request['qa_answer']) )
if( strlen($answer) AND strtolower($answer) == strtolower($this->request['qa_answer']) )
{
$pass = true;
break;
@@ -1857,7 +1755,7 @@ class public_core_global_register extends ipsCommand
$form_errors['general'][$this->lang->words['err_q_and_a']] = $this->lang->words['err_q_and_a'];
}
/* CHECK 2: Any errors ? */
/* CHECK 2: Any errors ? */
if ( count( $form_errors ) )
{
$this->registerForm( $form_errors );
@@ -1897,42 +1795,6 @@ class public_core_global_register extends ipsCommand
$spamCode = 0;
$_spamFlag = 0;
if( $this->settings['spam_service_enabled'] )
{
/* Query the service */
$spamCode = IPSMember::querySpamService( $in_email );
/* Action to perform */
$action = $this->settings[ 'spam_service_action_' . $spamCode ];
/* Perform Action */
switch( $action )
{
/* Proceed with registration */
case 1:
break;
/* Flag for admin approval */
case 2:
$member['member_group_id'] = $this->settings['auth_group'];
$this->settings['reg_auth_type'] = 'admin';
$_spamFlag = 1;
break;
/* Approve the account, but ban it */
case 3:
$member['member_banned'] = 1;
$member['bw_is_spammer'] = 1;
$this->settings['reg_auth_type'] = '';
break;
/* Deny registration */
case 4:
$this->registry->output->showError( 'spam_denied_account', '100x001', FALSE, '', 200 );
break;
}
}
//-----------------------------------------
// Create the account
//-----------------------------------------
@@ -1994,15 +1856,15 @@ class public_core_global_register extends ipsCommand
if ( $this->settings['reg_auth_type'] == 'user' OR $this->settings['reg_auth_type'] == 'admin_user' )
{
/* Send out the email. */
$message = array( 'THE_LINK' => $this->registry->getClass('output')->buildSEOUrl("app=core&module=global&section=register&do=auto_validate&uid=" . urlencode( $member['member_id'] ) . "&aid=" . urlencode( $validate_key ), 'publicNoSession', 'false'),
$message = array( 'THE_LINK' => $this->settings['base_url'] . "app=core&module=global&section=register&do=auto_validate&uid=" . urlencode( $member['member_id'] ) . "&aid=" . urlencode( $validate_key ),
'NAME' => $member['members_display_name'],
'MAN_LINK' => $this->registry->getClass('output')->buildSEOUrl("app=core&module=global&section=register&do=05", 'publicNoSession', 'false'),
'MAN_LINK' => $this->settings['base_url'] . "app=core&module=global&section=register&do=05",
'EMAIL' => $member['email'],
'ID' => $member['member_id'],
'CODE' => $validate_key );
IPSText::getTextClass('email')->setPlainTextTemplate( IPSText::getTextClass('email')->getTemplate( "reg_validate", $this->member->language_id ) );
IPSText::getTextClass('email')->buildPlainTextContent( $message );
IPSText::getTextClass('email')->buildPlainTextContent( $message );
IPSText::getTextClass('email')->buildHtmlContent( $message );
IPSText::getTextClass('email')->subject = sprintf( $this->lang->words['new_registration_email'], $this->settings['board_name'] );
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Reputation
* Last Updated: $Date: 2013-04-16 15:13:53 -0400 (Tue, 16 Apr 2013) $
* </pre>
@@ -2,19 +2,19 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* RSS output functionality
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* Last Updated: $Date: 2013-10-16 12:57:41 -0400 (Wed, 16 Oct 2013) $
* </pre>
*
* @author $Author: bfarber $
* @author $Author: AndyMillne $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @since Friday 18th March 2005
* @version $Revision: 10721 $
* @version $Revision: 12380 $
*/
if ( ! defined( 'IN_IPB' ) )
@@ -63,7 +63,7 @@ class public_core_global_rss extends ipsCommand
{
header("HTTP/1.1 503 Service Temporarily Unavailable");
}
header('Content-Type: text/html; charset=' . IPS_DOC_CHAR_SET);
print $this->lang->words['rss_board_offline'];
exit();
}
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Captcha
* Last Updated: $Date: 2013-01-07 12:09:37 -0500 (Mon, 07 Jan 2013) $
* </pre>
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Sitemap Forwarder
* Last Updated: $Date: 2012-05-10 21:10:13 +0100 (Thu, 10 May 2012) $
* </pre>
@@ -7,7 +7,7 @@
* $Author: AndyMillne $
* @since 27 March 2012
* $LastChangedDate: 2012-09-17 12:07:56 -0400 (Mon, 17 Sep 2012) $
* @version v3.4.5
* @version v3.4.6
* $Revision: 11342 $
*/
@@ -7,7 +7,7 @@
* $Author: ips_terabyte $
* @since 23 August 2012
* $LastChangedDate: 2012-04-05 17:35:31 +0100 (Thu, 05 Apr 2012) $
* @version v3.4.5
* @version v3.4.6
* $Revision: 10571 $
*/
@@ -7,7 +7,7 @@
* $Author: ips_terabyte $
* @since 20th February 2002
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
* @version v3.4.5
* @version v3.4.6
* $Revision: 8655 $
*/
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Help File System
* Last Updated: $Date: 2012-11-15 09:58:24 -0500 (Thu, 15 Nov 2012) $
* </pre>
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
IP.Board
</body>
</html>
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
IP.Board
</body>
</html>
@@ -7,7 +7,7 @@
* $Author: ips_terabyte $
* @since 2/14/2011
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
* @version v3.4.5
* @version v3.4.6
* $Revision: 8655 $
*/
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
IP.Board
</body>
</html>
@@ -6,7 +6,7 @@
* $Author: AndyMillne $
* @since 2/14/2011
* $LastChangedDate: 2013-05-28 10:00:25 -0400 (Tue, 28 May 2013) $
* @version v3.4.5
* @version v3.4.6
* $Revision: 12273 $
*/
@@ -7,7 +7,7 @@
* $Author: ips_terabyte $
* @since 20th February 2002
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
* @version v3.4.5
* @version v3.4.6
* $Revision: 8655 $
*/
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
IP.Board
</body>
</html>
@@ -8,7 +8,7 @@
* @author Based on original "Report Center" by Luke Scott
* @since -
* $LastChangedDate: 2012-12-13 08:29:08 -0500 (Thu, 13 Dec 2012) $
* @version v3.4.5
* @version v3.4.6
* $Revision: 11713 $
*/
@@ -7,7 +7,7 @@
* $Author: ips_terabyte $
* @since 20th February 2002
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
* @version v3.4.5
* @version v3.4.6
* $Revision: 8655 $
*/
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
IP.Board
</body>
</html>
File diff suppressed because it is too large. Load diff
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
IP.Board
</body>
</html>
@@ -2,7 +2,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* Task Manager
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
@@ -5,6 +5,6 @@
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
IP.Board
</body>
</html>
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* IP.Board v3.4.6
* User control panel resolver
* Last Updated: $Date: 2013-05-06 14:16:05 -0400 (Mon, 06 May 2013) $
* </pre>