HEX
Server: LiteSpeed
System: Linux premium267.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: predezso (1249)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: /home/predezso/uppoom.com/wp-content/plugins/bulk-delete/include/compatibility/simple-login-log.php
<?php
/**
 * Code to enable compatibility with other plugins.
 *
 * @since 5.5
 *
 * @author Sudar
 *
 * @package BulkDelete\Util\Compatibility
 */
defined( 'ABSPATH' ) || exit; // Exit if accessed directly

/**
 * Find out if Simple Login Log is installed or not.
 * http://wordpress.org/plugins/simple-login-log/.
 *
 * @since 5.5
 *
 * @return bool True if plugin is installed, False otherwise
 */
function bd_is_simple_login_log_present() { //phpcs:ignore
	global $wpdb;
	$simple_login_log_table = 'simple_login_log';

	return (bool) $wpdb->get_row( "SHOW TABLES LIKE '{$wpdb->prefix}{$simple_login_log_table}'" ); //phpcs:ignore
}

/**
 * Find the last login date/time of a user.
 *
 * @since 5.5
 *
 * @param int $user_id
 *
 * @return string
 */
function bd_get_last_login( $user_id ) { //phpcs:ignore
	global $wpdb;

	$simple_login_log_table = 'simple_login_log';

	return $wpdb->get_var( $wpdb->prepare( "SELECT time FROM {$wpdb->prefix}{$simple_login_log_table} WHERE uid = %d ORDER BY time DESC LIMIT 1", $user_id ) ); //phpcs:ignore
}