Commit 2e5e5b00 authored by Leigh Stoller's avatar Leigh Stoller

Minor bug fix.

parent ba7d5010
......@@ -1089,6 +1089,17 @@ function DOLOGIN_MAGIC($uid, $uid_idx, $email = null,
$lastactive = $lastrow[0];
$lastactivestr = $lastrow[1];
if ($lastactive &&
time() - $lastactive > (3600 * 24 * 365)) {
TBMAIL($TBMAIL_OPS,
"Web Login Inactivity Alert: '$uid'",
"Login by $uid ($uid_idx) after extended period ".
"of inactivity!\n".
"Last activity was $lastactivestr\n",
"From: $TBMAIL_OPS\n".
"Bcc: $TBMAIL_AUDIT\n".
"Errors-To: $TBMAIL_WWW");
}
if (time() - $lastactive > $limit) {
$rv = SUEXEC("nobody", "nobody", "webexports_setup",
SUEXEC_ACTION_IGNORE);
......@@ -1102,15 +1113,6 @@ function DOLOGIN_MAGIC($uid, $uid_idx, $email = null,
return;
}
}
if (time() - $lastactive > (3600 * 24 * 365)) {
TBMAIL($TBMAIL_OPS,
"Web Login Inactivity Alert: '$uid'",
"Login by $uid ($uid_idx) after extended period ".
"of inactivity!\n",
"From: $TBMAIL_OPS\n".
"Bcc: $TBMAIL_AUDIT\n".
"Errors-To: $TBMAIL_WWW");
}
}
}
......
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