diff --git a/code/AuditHook.php b/code/AuditHook.php index 11f9b95..2862ad4 100644 --- a/code/AuditHook.php +++ b/code/AuditHook.php @@ -160,7 +160,7 @@ public static function handle_manipulation($manipulation) /** * Log a record being published. */ - public function onAfterPublish(&$original) + protected function onAfterPublish(&$original) { $member = Security::getCurrentUser(); if (!$member || !$member->exists()) { @@ -203,7 +203,7 @@ public function onAfterPublish(&$original) /** * Log a record being unpublished. */ - public function onAfterUnpublish() + protected function onAfterUnpublish() { $member = Security::getCurrentUser(); if (!$member || !$member->exists()) { @@ -223,7 +223,7 @@ public function onAfterUnpublish() /** * Log a record being reverted to live. */ - public function onAfterRevertToLive() + protected function onAfterRevertToLive() { $member = Security::getCurrentUser(); if (!$member || !$member->exists()) { @@ -244,7 +244,7 @@ public function onAfterRevertToLive() /** * Log a record being duplicated. */ - public function onAfterDuplicate() + protected function onAfterDuplicate() { $member = Security::getCurrentUser(); if (!$member || !$member->exists()) { @@ -284,7 +284,7 @@ public function onAfterDelete() /** * Log a record being restored to stage. */ - public function onAfterRestoreToStage() + protected function onAfterRestoreToStage() { $member = Security::getCurrentUser(); if (!$member || !$member->exists()) { @@ -316,7 +316,7 @@ public function afterMemberLoggedIn() /** * Log successfully restored sessions from "remember me" cookies ("auto login"). */ - public function memberAutoLoggedIn() + protected function memberAutoLoggedIn() { $this->getAuditLogger()->info(sprintf( '"%s" (ID: %s) successfully restored autologin session', @@ -348,7 +348,7 @@ public function authenticationFailed($data) /** * Log failed login attempts when the email address doesn't map to an existing member record */ - public function authenticationFailedUnknownUser($data) + protected function authenticationFailedUnknownUser($data) { $this->authenticationFailed($data); } @@ -356,7 +356,7 @@ public function authenticationFailedUnknownUser($data) /** * Log permission failures (where the status is set after init of page). */ - public function onAfterInit() + protected function onAfterInit() { // Suppress errors if dev/build necessary if (!Security::database_is_ready()) { diff --git a/code/AuditHookMFA.php b/code/AuditHookMFA.php index 6beb793..7e41f7a 100644 --- a/code/AuditHookMFA.php +++ b/code/AuditHookMFA.php @@ -23,7 +23,7 @@ class AuditHookMFA extends DataExtension * @param Member $member * @param MethodInterface $method */ - public function onMethodVerificationSuccess(Member $member, $method) + protected function onMethodVerificationSuccess(Member $member, $method) { $this->getAuditLogger()->info( sprintf( @@ -41,7 +41,7 @@ public function onMethodVerificationSuccess(Member $member, $method) * @param Member $member * @param MethodInterface $method */ - public function onMethodVerificationFailure(Member $member, $method) + protected function onMethodVerificationFailure(Member $member, $method) { $context = [ 'method' => get_class($method), @@ -64,7 +64,7 @@ public function onMethodVerificationFailure(Member $member, $method) * * @param Member $member */ - public function onSkipRegistration(Member $member) + protected function onSkipRegistration(Member $member) { $this->getAuditLogger()->info(sprintf( '"%s" (ID: %s) skipped MFA registration', @@ -77,7 +77,7 @@ public function onSkipRegistration(Member $member) * @param Member $member * @param MethodInterface $method */ - public function onRegisterMethod(Member $member, $method) + protected function onRegisterMethod(Member $member, $method) { $context = [ 'method' => get_class($method), @@ -96,7 +96,7 @@ public function onRegisterMethod(Member $member, $method) * @param Member $member * @param MethodInterface $method */ - public function onRegisterMethodFailure(Member $member, $method) + protected function onRegisterMethodFailure(Member $member, $method) { $context = [ 'method' => get_class($method), diff --git a/code/AuditHookSessionManager.php b/code/AuditHookSessionManager.php index dc86795..9993134 100644 --- a/code/AuditHookSessionManager.php +++ b/code/AuditHookSessionManager.php @@ -21,7 +21,7 @@ class AuditHookSessionManager extends DataExtension * * @param LoginSession $loginSession */ - public function onBeforeRemoveLoginSession(LoginSession $loginSession) + protected function onBeforeRemoveLoginSession(LoginSession $loginSession) { $member = $loginSession->Member(); $currentUser = Security::getCurrentUser(); diff --git a/code/Extensions/DatabaseExtension.php b/code/Extensions/DatabaseExtension.php index 8abb547..3142684 100644 --- a/code/Extensions/DatabaseExtension.php +++ b/code/Extensions/DatabaseExtension.php @@ -7,7 +7,7 @@ class DatabaseExtension extends Extension { - public function onBeforeManipulate(array &$manipulation) + protected function onBeforeManipulate(array &$manipulation) { AuditHook::handle_manipulation($manipulation); }