Created
November 4, 2023 13:52
-
-
Save nextab/7dfcfecde0a540c8cce219aabfdb9abd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #region Check Activation Code | |
| /** | |
| * | |
| * @param $value mixed | |
| * @param $context \Jet_Form_Builder\Request\Parser_Context | |
| * | |
| * @return bool | |
| */ | |
| function jet_fb_v_activation_code_check( $value, $context ): bool { | |
| $user = wp_get_current_user(); | |
| if (!( $user && 'WP_User' === get_class( $user ) )) return false; | |
| $user_email = $user->user_email; | |
| if(get_jet_field('activation_code', $user_email) == $value) return true; | |
| return false; | |
| } | |
| #endregion Check Activation Code |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment