PluginProbe
Defender Security – Malware Scanner, Login Security & Firewall / 6.3.0
Defender Security – Malware Scanner, Login Security & Firewall v6.3.0
6.3.0 6.2.3 6.2.4 6.2.0 6.2.1 6.2.2 6.1.0 5.3.1 5.4.0 5.4.1 5.5.0 5.5.1 5.6.0 5.6.1 5.6.2 5.7.0 5.7.1 5.7.2 5.8.0 5.8.1 5.9.0 6.0.0 6.0.1 3.0.1 3.1.0 All 141 releases
← All changes | src/model/class-unlockout.php +19 -0 6.2.1 → 6.3.0 View file →
@@ -90,8 +90,26 @@
90 90 return $this->save();
91 91 }
92 92
93 93 /**
94 + * Checks whether a pending unlock request already exists.
95 + *
96 + * @param string $ip The IP address to check.
97 + * @param string $email The email address to check.
98 + *
99 + * @return bool
100 + */
101 + public static function has_pending_request( $ip, $email ): bool {
102 + $model = self::get_orm()->get_repository( self::class )
103 + ->where( 'ip', $ip )
104 + ->where( 'email', $email )
105 + ->where( 'status', self::STATUS_PENDING )
106 + ->first();
107 +
108 + return is_object( $model );
109 + }
110 +
111 + /**
94 112 * Remove data by given data.
95 113 *
96 114 * @param int $timestamp The timestamp to compare against.
97 115 * @param int $limit The maximum number of records to delete.
@@ -131,8 +149,9 @@
131 149
132 150 $model = $orm->get_repository( self::class )
133 151 ->where( 'id', $id )
134 152 ->where( 'email', $email )
153 + ->where( 'status', self::STATUS_PENDING )
135 154 ->first();
136 155
137 156 if ( ! is_object( $model ) ) {
138 157 return '';