View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0003495 | mantisbt | bugtracker | public | 2004-01-08 15:12 | 2004-02-06 16:16 |
| Reporter | vboctor | Assigned To | vboctor | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Product Version | 0.18.0 | ||||
| Summary | 0003495: Warning even if administrator account is disabled | ||||
| Description | The login page displays a warning even if the administrator account is disabled. The warning should only be displayed if the account exists and is enabled. | ||||
| Tags | No tags attached. | ||||
| Attached Files | 3495_fix_admin_account_warning.diff (984 bytes)
Index: login_page.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/login_page.php,v
retrieving revision 1.32
diff -u -r1.32 login_page.php
--- login_page.php 21 Aug 2003 14:31:42 -0000 1.32
+++ login_page.php 8 Jan 2004 14:12:29 -0000
@@ -112,8 +112,9 @@
}
# Generate a warning if administrator/root is valid.
- if ( user_get_id_by_name( 'administrator' ) !== false ) {
- if ( auth_does_password_match( user_get_id_by_name( 'administrator' ), 'root' ) ) {
+ $t_admin_user_id = user_get_id_by_name( 'administrator' );
+ if ( $t_admin_user_id !== false ) {
+ if ( user_is_enabled( $t_admin_user_id ) && auth_does_password_match( user_get_id_by_name( 'administrator' ), 'root' ) ) {
echo '<div class="warning" align="center">';
echo '<p><font color="red"><strong>WARNING:</strong> You should disable the default "administrator" account or change its password.</font></p>';
echo '</div>';
| ||||