Skip to content

Commit

Permalink
Some minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
vboctor committed Apr 16, 2017
1 parent 6810b10 commit 1850aae
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 22 deletions.
1 change: 1 addition & 0 deletions css/status_config.php
Expand Up @@ -69,6 +69,7 @@

switch( $t_referer_page ) {
case AUTH_PAGE_USERNAME:
case AUTH_PAGE_CREDENTIAL:
case 'signup_page.php':
case 'lost_pwd_page.php':
case 'account_update.php':
Expand Down
13 changes: 5 additions & 8 deletions login_page.php
Expand Up @@ -15,8 +15,10 @@
# along with MantisBT. If not, see <http://www.gnu.org/licenses/>.

/**
* Login page POSTs results to login.php
* Check to see if the user is already logged in
* Login page accepts username and posts results to login_password_page.php,
* which may take the users credential or redirect to a plugin specific page.
*
* This page also offers features like anonymous login and signup.
*
* @package MantisBT
* @copyright Copyright 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
Expand Down Expand Up @@ -76,8 +78,6 @@

$t_show_anonymous_login = auth_anonymous_enabled();

$t_show_warnings = true;

$t_form_title = lang_get( 'login_title' );

# If user is already authenticated and not anonymous
Expand Down Expand Up @@ -211,7 +211,6 @@ function debug_setting_message ( $p_type, $p_setting, $p_value ) {
<?php echo $t_form_title ?>
</h4>
<div class="space-10"></div>
<!-- Login Form BEGIN -->
<form id="login-form" method="post" action="<?php echo AUTH_PAGE_CREDENTIAL ?>">
<fieldset>

Expand Down Expand Up @@ -242,14 +241,12 @@ class="form-control autofocus">
</fieldset>
</form>

<!-- Login Form END -->

<?php
#
# Do some checks to warn administrators of possible security holes.
#

if( $t_show_warnings && count( $t_warnings ) > 0 ) {
if( count( $t_warnings ) > 0 ) {
echo '<div class="space-10"></div>';
echo '<div class="alert alert-warning">';
foreach( $t_warnings AS $t_warning ) {
Expand Down
21 changes: 7 additions & 14 deletions login_password_page.php
Expand Up @@ -15,12 +15,14 @@
# along with MantisBT. If not, see <http://www.gnu.org/licenses/>.

/**
* Login page POSTs results to login.php
* Check to see if the user is already logged in
* Login credential page asks user for password then posts to login.php page.
* If an authentication plugin is installed and has its own credential page,
* this page will re-direct to it.
*
* This page also offers features like remember me, secure session, and forgot password.
*
* @package MantisBT
* @copyright Copyright 2000 - 2002 Kenzaburo Ito - kenito@300baud.org
* @copyright Copyright 2002 MantisBT Team - mantisbt-dev@lists.sourceforge.net
* @copyright Copyright MantisBT Team - mantisbt-dev@lists.sourceforge.net
* @link http://www.mantisbt.org
*
* @uses core.php
Expand Down Expand Up @@ -101,12 +103,6 @@
print_header_redirect( $t_redirect_url );
}

if( config_get_global( 'email_login_enabled' ) ) {
$t_username_label = lang_get( 'username_or_email' );
} else {
$t_username_label = lang_get( 'username' );
}

$t_session_validation = !$f_reauthenticate && ( ON == config_get_global( 'session_validation' ) );

$t_show_reset_password = !$f_reauthenticate &&
Expand Down Expand Up @@ -135,7 +131,7 @@
# - If errors, use the value passed in.
if( $t_session_validation ) {
if( !$f_error && !$f_cookie_error ) {
$t_default_secure_session = ( is_null( $f_secure_session_cookie ) ? true : $f_secure_session_cookie );
$t_default_secure_session = is_null( $f_secure_session_cookie ) ? true : $f_secure_session_cookie;
} else {
$t_default_secure_session = $f_secure_session;
}
Expand Down Expand Up @@ -209,7 +205,6 @@
<?php echo $t_form_title ?>
</h4>
<div class="space-10"></div>
<!-- Login Form BEGIN -->
<form id="login-form" method="post" action="login.php">
<fieldset>

Expand Down Expand Up @@ -271,8 +266,6 @@ class="form-control autofocus">
?>
</fieldset>
</form>

<!-- Login Form END -->
</div>
</div>
</div>
Expand Down

0 comments on commit 1850aae

Please sign in to comment.