Skip to content

Commit

Permalink
Remove old code from account_page
Browse files Browse the repository at this point in the history
After the new functionality of verify.php page was implemented (see
issue #20686), account_page is no longer included, and some old code can
be removed.
  • Loading branch information
cproensa authored and dregad committed May 24, 2016
1 parent f3ab14c commit f7b1152
Showing 1 changed file with 11 additions and 25 deletions.
36 changes: 11 additions & 25 deletions account_page.php
Expand Up @@ -102,32 +102,18 @@
# If the password is the default password, then prompt user to change it.
$t_reset_password = $u_username == 'administrator' && auth_does_password_match( $u_id, 'root' );

# note if we are being included by a script of a different name, if so,
# this is a mandatory password change request
$t_verify = is_page_name( 'verify.php' );

$t_can_change_password = helper_call_custom_function( 'auth_can_change_password', array() );
$t_force_pw_reset = false;

if( $t_verify || $t_reset_password ) {
$t_can_change_password = helper_call_custom_function( 'auth_can_change_password', array() );

echo '<div id="reset-passwd-msg" class="important-msg">';
echo '<ul>';

if( $t_verify ) {
echo '<li>' . lang_get( 'verify_warning' ) . '</li>';

if( $t_can_change_password ) {
echo '<li>' . lang_get( 'verify_change_password' ) . '</li>';
$t_force_pw_reset = true;
}
} else if( $t_reset_password && $t_can_change_password ) {
echo '<li>' . lang_get( 'warning_default_administrator_account_present' ) . '</li>';
$t_force_pw_reset = true;
}

echo '</ul>';
echo '</div>';
if( $t_reset_password && $t_can_change_password ) {
?>
<div id="reset-passwd-msg" class="important-msg">
<ul>
<li><?php echo lang_get( 'warning_default_administrator_account_present' ) ?></li>
</ul>
</div>
<?php
$t_force_pw_reset = true;
}

$t_force_pw_reset_html = '';
Expand All @@ -143,7 +129,7 @@
<?php echo form_security_field( 'account_update' );
print_account_menu( 'account_page.php' );

if( !helper_call_custom_function( 'auth_can_change_password', array() ) ) {
if( !$t_can_change_password ) {
# With LDAP -->
?>
<div class="field-container">
Expand Down

0 comments on commit f7b1152

Please sign in to comment.