Skip to content

Commit

Permalink
fixing bug #2697
Browse files Browse the repository at this point in the history
web basic for guest accounts
  • Loading branch information
cigamit committed Aug 14, 2016
1 parent 125b58b commit 6998349
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions auth_login.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@
/* Locate user in database */
$user = db_fetch_row_prepared('SELECT * FROM user_auth WHERE username = ? AND realm = 2', array($username));

if (!$user && read_config_option('user_template') == '0') {
cacti_log("ERROR: User '" . $username . "' authenticated by Web Server, but a Template User is not defined in Cacti. Exiting.", false, 'AUTH');
if (!$user && read_config_option('user_template') == '0' && read_config_option('guest_user') == '0') {
cacti_log("ERROR: User '" . $username . "' authenticated by Web Server, but both Template and Guest Users are not defined in Cacti. Exiting.", false, 'AUTH');
$username = htmlspecialchars($username);
auth_display_custom_error_message( __('%s authenticated by Web Server, but a Template User is not defined in Cacti.', $username) );
auth_display_custom_error_message( __('%s authenticated by Web Server, but both Template and Guest Users are not defined in Cacti.', $username) );
exit;
}

Expand Down

0 comments on commit 6998349

Please sign in to comment.