header('Location: index.php'); exit; } else { $users = system_get_user_list(); foreach ($users as $userk => $userv) { $password = crypt($_POST['password'], $userv['password']); if ($_POST['username'] === $userv['name'] && $password === $userv['password']) { // Check if it is a local user if (FALSE === ($cnid = array_search_ex($userv['uid'], $config['access']['user'], "id"))) { break; } // Is user allowed to access the user portal? if (!isset($config['access']['user'][$cnid]['userportal'])) { break; } Session::initUser($userv['uid'], $userv['name']); header('Location: index.php'); exit; } } } write_log(gettext("Authentication error for illegal user {$_POST['username']} from {$_SERVER['REMOTE_ADDR']}")); } header("Content-Type: text/html; charset=" . system_get_language_codeset()); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo system_get_language_code(); ?> " lang="<?php echo system_get_language_code();