Skip to content

Commit

Permalink
Add a check for incomplete 2FA setup
Browse files Browse the repository at this point in the history
  • Loading branch information
tbar0970 committed May 30, 2024
1 parent 881ed53 commit 5f72020
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions views/view_10_admin__6_system_configuration.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ public function processView()
}
}

private function _doConfigChecks()
{
if ((ifdef('2FA_REQUIRED_PERMS') > 0) && SMS_Sender::usesUserMobile() && strlen(ifdef('2FA_SENDER_ID')) == 0) {
print_message("2-Factor authentication will not work until you set the 2FA_SENDER_ID setting", 'error');
}
}

public function printView()
{
if (JETHRO_VERSION == 'DEV') {
Expand All @@ -61,6 +68,7 @@ public function printView()
<?php
}
}
$this->_doConfigChecks();
?>
<form method="post">
<div class="form-horizontal">
Expand Down

0 comments on commit 5f72020

Please sign in to comment.