diff --git a/html/inc/boinc_db.inc b/html/inc/boinc_db.inc
index 414c0c91bc..88e9f0dfcb 100644
--- a/html/inc/boinc_db.inc
+++ b/html/inc/boinc_db.inc
@@ -442,9 +442,9 @@ class BoincProfile {
$db = BoincDb::get();
return $db->enum_fields('profile', 'BoincProfile', $fields, $where_clause, $order_clause);
}
- function delete($userid) {
+ function delete() {
$db = BoincDb::get();
- return $db->delete_aux("userid=$userid");
+ return $db->delete_aux("userid=".$this->userid);
}
static function delete_aux($clause) {
$db = BoincDb::get();