Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Avoid problems with quotes and so on in user records when updating users
  • Loading branch information
moodler committed Jul 28, 2003
1 parent b7aa3ae commit f406e67
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions admin/user.php
Expand Up @@ -124,11 +124,13 @@

exit;
} else if (!$user->deleted) {
$user->deleted = "1";
$user->username = "$user->email.".time(); // Remember it just in case
$user->email = ""; // Clear this field to free it up
$user->timemodified = time();
if (update_record("user", $user)) {
unset($updateuser);
$updateuser->id = $user->id;
$updateuser->deleted = "1";
$updateuser->username = "$user->email.".time(); // Remember it just in case
$updateuser->email = ""; // Clear this field to free it up
$updateuser->timemodified = time();
if (update_record("user", $updateuser)) {
unenrol_student($user->id); // From all courses
remove_teacher($user->id); // From all courses
remove_admin($user->id);
Expand Down

0 comments on commit f406e67

Please sign in to comment.