Commit 7343c13e authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Don't send inactive email unless an inactivity time is set

parent 03ba33da
...@@ -1136,6 +1136,7 @@ function auth_handle_account_expiries() { ...@@ -1136,6 +1136,7 @@ function auth_handle_account_expiries() {
} }
if ($expire) {
// Inactivity (lastlogin is too old) // Inactivity (lastlogin is too old)
if ($users = get_records_sql_array('SELECT u.id, u.username, u.firstname, u.lastname, u.preferredname, u.email, u.admin, u.staff if ($users = get_records_sql_array('SELECT u.id, u.username, u.firstname, u.lastname, u.preferredname, u.email, u.admin, u.staff
FROM {usr} u FROM {usr} u
...@@ -1160,6 +1161,7 @@ function auth_handle_account_expiries() { ...@@ -1160,6 +1161,7 @@ function auth_handle_account_expiries() {
deactivate_user($user->id); deactivate_user($user->id);
} }
} }
}
// Institution membership expiry // Institution membership expiry
delete_records_sql('DELETE FROM {usr_institution} delete_records_sql('DELETE FROM {usr_institution}
......
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