From 5c835e08b43991454c99b2e30a96375c4e9e170f Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Fri, 24 Feb 2017 12:01:15 -0500 Subject: [PATCH] Add a filter for is_user_moderated This will test the userLogginIn array to see if the contact user is moderated. --- setup/adminHooks.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/setup/adminHooks.php b/setup/adminHooks.php index a873298..c64224e 100644 --- a/setup/adminHooks.php +++ b/setup/adminHooks.php @@ -114,5 +114,16 @@ add_filter( 2 ); - +add_filter( 'glm_contact_is_moderated', function( $user ) { + if ( isset( $user['contactUser'] ) + && !in_array( + $user['contactUser']['access'], + array( $this->config['access_numb']['Full'], $this->config['access_numb']['NotDisplayedNotModerated'] ) + ) + ) { + return true; + } else { + return false; + } +} ); ?> -- 2.17.1