dam-spam/modules/check-admin-log.php
2025-11-23 20:28:22 -07:00

30 lines
No EOL
705 B
PHP

<?php
if ( !defined( 'ABSPATH' ) ) {
status_header( 404 );
exit;
}
class dam_spam_check_admin_log extends dam_spam_module {
public function process( $ip, &$stats = array(), &$options = array(), &$post = array() ) {
$sname = $this->getSname();
if ( !class_exists( 'GoogleAuthenticator' )
&& strpos( $sname, 'wp-login.php' ) !== false
&& function_exists( 'wp_authenticate' )
) {
$log = $post['author'];
$pwd = $post['pwd'];
if ( empty( $log ) || empty( $pwd ) ) {
return false;
}
$user = @wp_authenticate( $log, $pwd );
if ( !is_wp_error( $user ) ) {
return esc_html__( 'Authenticated User Login', 'dam-spam' );
}
return false;
}
return false;
}
}
?>