Skip to content

Commit

Permalink
BUGFIX: DashbaordMember onAfterWrite creates infinite loop
Browse files Browse the repository at this point in the history
  • Loading branch information
unclecheese committed Jun 9, 2014
1 parent 2deb5c4 commit 2bbf6ba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions code/DashboardMember.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ public function onAfterWrite() {
$clone->MemberID = $this->owner->ID;
$clone->write();
}
$this->owner->HasConfiguredDashboard = 1;
// Get a fresh record, so we don't run in to recursive writes.
Member::get()->byID($this->owner->ID)->write();

DB::query("UPDATE Member SET HasConfiguredDashboard = 1 WHERE ID = {$this->owner->ID}");
$this->owner->flushCache();
}
}
}

0 comments on commit 2bbf6ba

Please sign in to comment.