Skip to content

Commit

Permalink
Merge branch 1
Browse files Browse the repository at this point in the history
  • Loading branch information
mlewis-everley committed Feb 23, 2018
2 parents 564eea8 + 905d6e9 commit 58f38a8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
10 changes: 9 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,16 @@ Minor update to:
* Update to index extension call to more logical naming
* Minor tweak to account summary template

# 1.2.1

* Add additional extension hooks when edit form submitted

# 2.0.0

* SS4 support based on version 1.1.1
* Update to index extension call to more logical naming
* Minor tweak to account summary template
* Minor tweak to account summary template

# 2.0.1

* Add additional extension hooks when edit form submitted
6 changes: 5 additions & 1 deletion src/forms/EditAccountForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ public function doUpdate($data)
$member = Member::get()->byID($data["ID"]);
$curr = Security::getCurrentUser();

$this->extend("onBeforeUpdate", $data);

// Check that a member isn't trying to mess up another users profile
if (!empty($curr) && $member->canEdit($curr)) {
// Save member
Expand All @@ -98,8 +100,10 @@ public function doUpdate($data)
);
}

$this->extend("onAfterUpdate", $data);

return $this
->getController()
->redirectBack();
}
}
}

0 comments on commit 58f38a8

Please sign in to comment.