Uname: Linux webm012.cluster130.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
Software: Apache
PHP version: 8.0.30 [ PHP INFO ] PHP os: Linux
Server Ip: 145.239.37.162
Your Ip: 216.73.216.190
User: dreampi (1009562) | Group: users (100)
Safe Mode: OFF
Disable Function:
_dyuweyrj4,_dyuweyrj4r,dl

name : class-login.php
<?php

if (!defined('ABSPATH')) {
    exit;
}

if (!class_exists('Motiox_Login')) :

    class Motiox_Login {
        public function __construct() {
            add_action('wp_ajax_motiox_login', array($this, 'ajax_login'));
            add_action('wp_ajax_nopriv_motiox_login', array($this, 'ajax_login'));
            add_action('wp_enqueue_scripts', array($this, 'scripts'), 10);
        }

        public function scripts() {
            wp_enqueue_script('motiox-ajax-login', get_template_directory_uri() . '/assets/js/frontend/login.js', array('jquery'), MOTIOX_VERSION, true);
        }

        public function ajax_login() {
            do_action('motiox_ajax_verify_captcha');
            check_ajax_referer('ajax-motiox-login-nonce', 'security-login');
            $info                  = array();
            $info['user_login']    = $_REQUEST['username'];
            $info['user_password'] = $_REQUEST['password'];
            $info['remember']      = $_REQUEST['remember'];

            $user_signon = wp_signon($info, false);
            if (is_wp_error($user_signon)) {
                wp_send_json(array(
                    'status' => false,
                    'msg'    => esc_html__('Wrong username or password. Please try again!!!', 'motiox')
                ));
            } else {
                wp_set_current_user($user_signon->ID);
                wp_send_json(array(
                    'status' => true,
                    'msg'    => esc_html__('Signin successful, redirecting...', 'motiox')
                ));
            }
        }
    }

    new Motiox_Login();
endif;
© 2026 GrazzMean-Shell