Code Duplication    Length = 8-8 lines in 3 locations

modules/otp.php 1 location

@@ 268-275 (lines=8) @@
265
	 *
266
	 * @return void
267
	 */
268
	public function delete($key)
269
	{
270
		$sql = 'DELETE FROM ' . $this->otp_registration_table . '
271
					WHERE user_id = ' . (int) $this->user->data['user_id'] . '
272
					AND registration_id =' . (int) $key;
273
274
		$this->db->sql_query($sql);
275
	}
276
277
	/**
278
	 * Select all registration objects from the database

modules/u2f.php 1 location

@@ 355-362 (lines=8) @@
352
	 * @param int $key
353
	 * @return void
354
	 */
355
	public function delete($key)
356
	{
357
		$sql = 'DELETE FROM ' . $this->registration_table . '
358
					WHERE user_id = ' . (int) $this->user->data['user_id'] . '
359
					AND registration_id =' . (int) $key;
360
361
		$this->db->sql_query($sql);
362
	}
363
364
	/**
365
	 * If this module can add new keys (Or other things)

modules/backup_key.php 1 location

@@ 266-273 (lines=8) @@
263
	 *
264
	 * @return void
265
	 */
266
	public function delete($key)
267
	{
268
		$sql = 'DELETE FROM ' . $this->backup_registration_table . '
269
					WHERE user_id = ' . (int) $this->user->data['user_id'] . '
270
					AND registration_id =' . (int) $key;
271
272
		$this->db->sql_query($sql);
273
	}
274
275
	/**
276
	 * Select all registration objects from the database