Version 4.7.8

This commit is contained in:
Neo committed 2025-12-19 16:10:42 -08:00
1 parent 7b7404e741
commit fd22d99e69
688 files changed
+19814 -10890

No files matched your search

+13 -2
View File
@@ -191,6 +191,15 @@ class _Handler extends \IPS\MFA\MFAHandler
*/
public function toggle( $enabled )
{
if( $enabled )
{
/* Check we have some questions */
if ( !count( \IPS\MFA\SecurityQuestions\Question::roots() ) )
{
throw new \DomainException( 'no_questions' );
}
}
\IPS\Settings::i()->changeValues( array( 'security_questions_enabled' => $enabled ) );
}
@@ -222,7 +231,9 @@ class _Handler extends \IPS\MFA\MFAHandler
), NULL, NULL, NULL, 'security_questions_groups' ) );
$form->add( new \IPS\Helpers\Form\Radio( 'security_questions_prompt', \IPS\Settings::i()->security_questions_prompt, FALSE, array( 'options' => array( 'register' => 'security_questions_prompt_register', 'optional' => 'security_questions_prompt_optional', 'access' => 'security_questions_prompt_access' ) ), NULL, NULL, NULL, 'security_questions_prompt' ) );
$form->add( new \IPS\Helpers\Form\Number( 'security_questions_number', \IPS\Settings::i()->security_questions_number, FALSE, array( 'min' => 1, 'max' => \IPS\Db::i()->select( 'COUNT(*)', 'core_security_questions' )->first() ?: NULL ), NULL, NULL, NULL, 'security_questions_number' ) );
$form->addMessage('nexus_mfa_reset_answers');
if ( $values = $form->values() )
{
$values['security_questions_groups'] = ( $values['security_questions_groups'] == '*' ) ? '*' : implode( ',', $values['security_questions_groups'] );
@@ -352,7 +363,7 @@ class _Handler extends \IPS\MFA\MFAHandler
* If member has configured this handler, disable it
*
* @param \IPS\Member $member The member
* @return bool
* @return void
*/
public function disableHandlerForMember( \IPS\Member $member )
{