From 905d6e91799f960ddc621e065a6b8042840bff7c Mon Sep 17 00:00:00 2001 From: Morven Lewis-Everley Date: Fri, 23 Feb 2018 16:18:21 +0000 Subject: [PATCH] Add extra extension hooks --- changelog.md | 6 +++++- code/forms/Users_EditAccountForm.php | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 8a35d2e..4d154b4 100644 --- a/changelog.md +++ b/changelog.md @@ -33,4 +33,8 @@ Minor update to: # 1.2.0 * Update to index extension call to more logical naming -* Minor tweak to account summary template \ No newline at end of file +* Minor tweak to account summary template + +# 1.2.1 + +* Add additional extension hooks when edit form submitted \ No newline at end of file diff --git a/code/forms/Users_EditAccountForm.php b/code/forms/Users_EditAccountForm.php index f2bdbf2..09508af 100755 --- a/code/forms/Users_EditAccountForm.php +++ b/code/forms/Users_EditAccountForm.php @@ -66,6 +66,8 @@ public function doUpdate($data) $filter = array(); $member = Member::get()->byID($data["ID"]); + $this->extend("onBeforeUpdate", $data); + // Check that a mamber isn't trying to mess up another users profile if (Member::currentUserID() && $member->canEdit(Member::currentUser())) { // Save member @@ -83,6 +85,8 @@ public function doUpdate($data) ); } + $this->extend("onAfterUpdate", $data); + return $this->controller->redirectBack(); } }