PluginProbe
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder / 2.14.0
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder v2.14.0
2.14.0 2.13.0 2.13.1 2.12.0 2.11.1 2.11.0 2.10.0 2.9.0 2.7.4 2.7.5 2.7.6 2.7.7 2.8.0 2.8.1 2.9.1 trunk 1.0 1.0-beta1 1.0-beta2 1.0-beta3 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 All 81 releases
← All changes | includes/blocks/form-builder/email-verification.php +6 -1 2.9.1 → 2.14.0 View file →
@@ -1,7 +1,11 @@
1 1 <?php
2 2 namespace ABlocks\Blocks\FormBuilder;
3 3
4 +if ( ! defined( 'ABSPATH' ) ) {
5 + exit;
6 +}
7 +
4 8 use Exception;
5 9 /**
6 10 * @class EmailVerification
7 11 * This class is user to verify forms email
@@ -25,9 +29,9 @@
25 29 $query = "SELECT id, user_email, email_verification_token, expire, is_email_verified FROM {$table_entries} WHERE id = %d";
26 30 } else {
27 31 $query = "SELECT id, user_email, email_verification_token, expire, is_email_verified FROM {$table_entries} WHERE user_email = %s";
28 32 }
29 - // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
33 + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.NotPrepared
30 34 $entry = $wpdb->get_row( $wpdb->prepare( $query, $id_or_email ), ARRAY_A );
31 35
32 36 if (
33 37 ! array_key_exists( 'email_verification_token', $entry ) ||
@@ -73,8 +77,9 @@
73 77
74 78 public function mark_email_as_verified() {
75 79 global $wpdb;
76 80 $table_entries = $wpdb->prefix . ABLOCKS_PLUGIN_SLUG . '_form_entries';
81 + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching
77 82 if ( $wpdb->update( $table_entries, [ 'is_email_verified' => 'yes' ], [ 'id' => $this->id ] ) ) {
78 83 return true;
79 84 }
80 85 return false;