UNCLASSIFIED

Skip to content
Snippets Groups Projects
Commit d7c19889 authored by ben's avatar ben
Browse files

tweak to include alt_name in checks for existing account

parent a6382f81
1 merge request!115bug fix, features added.
......@@ -377,6 +377,8 @@ $TEST_URL="index.html?do_test=";
* Supported test cases:
* do_test=
* good
* trainee
* trainee_has_account
* nocert
* noaccount
* disabled
......@@ -416,7 +418,7 @@ case "aup":
break;
case "account_info":
$user_info = get_info_from_cert($_SERVER["RAWCERT"]);
$account_info = check_account($user_info["user_name"]);
$account_info = check_account($user_info["user_name"], $user_info["alt_name"]);
$output = array(
"uid" => $account_info["uid"],
"has_account" => $account_info["exists"],
......@@ -456,12 +458,12 @@ case "reset";
$output = "";
if($user_info["success"])
{
$account = check_account($user_info["user_name"]);
$account = check_account($user_info["user_name"],$user_info["alt_name"]);
if($account["exists"])
{
if(!$account["disabled"])
{
$output = reset_account($user_info["user_name"]);
$output = reset_account($account["uid"]);
} else
{
$output = "Account is disabled. Please contact administrator.";
......@@ -476,7 +478,7 @@ case "create";
$output = "";
if($user_info["success"])
{
$account = check_account($user_info["user_name"]);
$account = check_account($user_info["user_name"],$user_info["alt_name"]);
if( ! $account["exists"])
{
$output = create_account($user_info);
......@@ -490,7 +492,7 @@ case "create";
if($NOJS)
{
$user_info = get_info_from_cert($_SERVER["RAWCERT"]);
$account_info = check_account($user_info["user_name"]);
$account_info = check_account($user_info["user_name"], $user_info["alt_name"]);
$content = "<h2>please enable javascript for a better experience<h2>";
$content .= "<h3>Acceptable Use Policy</h3>";
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment