Commit d1d1e1f8 authored by Leigh Stoller's avatar Leigh Stoller

Make it more apparent when user is frozen.

parent 75593dbd
<?php
#
# Copyright (c) 2000-2017 University of Utah and the Flux Group.
# Copyright (c) 2000-2018 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -263,7 +263,23 @@ else {
SPITHEADER();
echo "<h4>
Your account has been frozen due to earlier login attempt
failures. You must contact $TBMAILADDR to have your account
failures. You must contact $SUPPORT to have your account
restored. <br> <br>
Please do not attempt to login again; it will not work!
</h4>\n";
echo "<script src='js/lib/jquery-2.0.3.min.js'></script>\n";
SPITNULLREQUIRE();
SPITFOOTER();
return;
}
elseif ($dologin_status == DOLOGIN_STATUS_FROZEN) {
# Short delay.
sleep(1);
SPITHEADER();
echo "<h4>
Your account has been frozen!
You must contact $SUPPORT to have your account
restored. <br> <br>
Please do not attempt to login again; it will not work!
</h4>\n";
......@@ -279,7 +295,7 @@ else {
SPITHEADER();
echo "<h4>
Your account has gone <b>inactive</b> since it has been so
long since your last login. Please contact $TBMAILADDR
long since your last login. Please contact $SUPPORT
to have your account restored. <br> <br>
Please do not attempt to login again; it will not work!
</h4>\n";
......
<?php
#
# Copyright (c) 2000-2017 University of Utah and the Flux Group.
# Copyright (c) 2000-2018 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -85,6 +85,7 @@ define("DOLOGIN_STATUS_ERROR", -1);
define("DOLOGIN_STATUS_IPFREEZE", -2);
define("DOLOGIN_STATUS_WEBFREEZE", -3);
define("DOLOGIN_STATUS_INACTIVE", -4);
define("DOLOGIN_STATUS_FROZEN", -5);
# So we can redefine this in the APT pages.
$CHANGEPSWD_PAGE = "moduserinfo.php3";
......@@ -972,8 +973,11 @@ function DOLOGIN($token, $password, $adminmode = 0, $nopassword = 0) {
$user->SetGaUserid($ga_userid);
}
# But inactive users need special handling.
if ($user->status() == TBDB_USERSTATUS_INACTIVE) {
# But inactive/frozen users need special handling.
if ($user->status() == TBDB_USERSTATUS_FROZEN) {
return DOLOGIN_STATUS_FROZEN;
}
elseif ($user->status() == TBDB_USERSTATUS_INACTIVE) {
if (1) {
TBMAIL($user->email(),
"Web Login Inactivity Alert: '$uid'",
......
Markdown is supported
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