When auth is not turned on, show an error instead of login fields.

This commit is contained in:
Isaac Connor 2021-02-16 16:09:23 -05:00
parent 59cdf971fa
commit aa94795b96
1 changed files with 12 additions and 0 deletions

View File

@ -4,6 +4,9 @@ xhtmlHeaders(__FILE__, translate('Login'));
<body>
<?php echo getNavBarHTML(); ?>
<div class="container">
<?php
if ( defined('ZM_OPT_USE_AUTH') and ZM_OPT_USE_AUTH ) {
?>
<form class="center-block" name="loginForm" id="loginForm" method="post" action="?">
<input type="hidden" name="action" value="login"/>
<input type="hidden" name="view" value="login"/>
@ -34,6 +37,15 @@ if (
} ?>
<button class="btn btn-lg btn-primary btn-block" type="submit"><?php echo translate('Login') ?></button>
</div>
<?php
} else {
?>
<div class="error">
User Authentication is not turned on. You cannot log in.
</div>
<?php
} # end if ZM_OPT_AUTH
?>
</form>
</div>
<?php xhtmlFooter() ?>