Commit f1c3e2ca authored by Nigel McNie's avatar Nigel McNie
Browse files

Minor cleanup to my previous patch for deleting users. Reuse a variable.

parent bd634c92
......@@ -645,13 +645,13 @@ function unsuspend_user($userid) {
function delete_user($userid) {
db_begin();
$emailsuffix = '.deleted.' . time();
$datasuffix = '.deleted.' . time();
$deleterec = new StdClass;
$deleterec->id = $userid;
$deleterec->username = get_field('usr', 'username', 'id', $userid) . '.deleted.' . time();
$deleterec->username = get_field('usr', 'username', 'id', $userid) . $datasuffix;
$deleterec->deleted = 1;
$deleterec->email = get_field('usr', 'email', 'id', $userid) . $emailsuffix;
$deleterec->email = get_field('usr', 'email', 'id', $userid) . $datasuffix;
// Set authinstance to default internal, otherwise the old authinstance can be blocked from deletion
// by deleted users.
......
Supports Markdown
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