Version 4.1.2

This commit is contained in:
Neo committed 2025-12-19 05:32:19 -08:00
1 parent 3ba79295ee
commit 28bd025b35
1131 files changed
+63658 -20579

No files matched your search

@@ -36,7 +36,8 @@ class _register extends \IPS\Dispatcher\Controller
}
if( !\IPS\Settings::i()->allow_reg and \IPS\Request::i()->do !== 'complete'
and \IPS\Request::i()->do !== 'changeEmail' and \IPS\Request::i()->do !== 'validate' and \IPS\Request::i()->do !== 'validating' )
and \IPS\Request::i()->do !== 'changeEmail' and \IPS\Request::i()->do !== 'validate'
and \IPS\Request::i()->do !== 'validating' and \IPS\Request::i()->do !== 'reconfirm' )
{
\IPS\Output::i()->error( 'reg_disabled', '2S129/5', 403, '' );
}
@@ -152,7 +153,7 @@ class _register extends \IPS\Dispatcher\Controller
/* Set Session Location */
\IPS\Session::i()->setLocation( \IPS\Http\Url::internal( 'app=core&module=system&controller=register', NULL, 'register' ), array(), 'loc_registering' );
\IPS\Output::i()->allowDefaultWidgets = FALSE;
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack('registration');
\IPS\Output::i()->output = (string) new \IPS\Helpers\Wizard( $steps, \IPS\Http\Url::internal( 'app=core&module=system&controller=register' ), FALSE );
}
@@ -447,10 +448,20 @@ class _register extends \IPS\Dispatcher\Controller
{
\IPS\Member::loggedIn()->email = $values['email_address'];
if( \IPS\Member::loggedIn()->spamService() == 4 )
if( \IPS\Settings::i()->spam_service_enabled )
{
\IPS\Member::loggedIn()->delete();
\IPS\Output::i()->error( 'spam_denied_account', '2S272/1', 403, '' );
if( \IPS\Member::loggedIn()->spamService() == 4 )
{
$action = \IPS\Settings::i()->spam_service_action_4;
/* Any other action will automatically be handled by the call to spamService() */
if( $action == 4 )
{
\IPS\Member::loggedIn()->delete();
}
\IPS\Output::i()->error( 'spam_denied_account', '2S272/1', 403, '' );
}
}
/* If email validation is enabled add a validating record */
@@ -570,4 +581,37 @@ class _register extends \IPS\Dispatcher\Controller
/* Redirect */
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( '' ), 'reg_canceled' );
}
/**
* Reconfirm terms or privacy policy
*
* @return void
*/
protected function reconfirm()
{
/* Generate form */
$form = new \IPS\Helpers\Form;
$form->class = 'ipsForm_vertical';
$form->add( new \IPS\Helpers\Form\Checkbox( 'reconfirm_checkbox', NULL, FALSE, array(), function( $val )
{
if ( !$val )
{
throw new \InvalidArgumentException('reg_not_agreed_terms');
}
} ) );
/* Handle submissions */
if ( $values = $form->values() )
{
\IPS\Member::loggedIn()->members_bitoptions['must_reaccept_privacy'] = FALSE;
\IPS\Member::loggedIn()->members_bitoptions['must_reaccept_terms'] = FALSE;
\IPS\Member::loggedIn()->save();
\IPS\Output::i()->redirect( \IPS\Http\Url::internal('') );
}
/* Display */
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack('terms_of_use');
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate('system')->reconfirmTerms( \IPS\Member::loggedIn()->members_bitoptions['must_reaccept_terms'], \IPS\Member::loggedIn()->members_bitoptions['must_reaccept_privacy'], $form );
}
}