HEX
Server: LiteSpeed
System: Linux melbournecleaninggroup 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: www-data (33)
PHP: 7.3.33-1+focal
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: /var/www/html/wp-content/plugins/dologin/assets/login.js
document.addEventListener( 'DOMContentLoaded', function() { jQuery( document ).ready( function( $ ) {
	var dologin_can_submit_user = '';
	var dologin_can_submit_bypass = false;

	function dologin_cb( e )
	{
		var dologin_user_handler = '#user_login';
		if ( $( this ).find( '#username' ).length ) {
			dologin_user_handler = '#username';
		}

		if ( dologin_can_submit_user && dologin_can_submit_user == $( dologin_user_handler ).val() ) {
			return true;
		}

		if ( dologin_can_submit_bypass ) {
			return true;
		}

		e.preventDefault();

		$( '#dologin-process' ).show();
		$( '#dologin-process-msg' ).attr( 'class', 'dologin-spinner' ).html( '' );

		// Append the submit button for 2nd time submission
		var submit_btn = $( this ).find( '[type=submit]' ).first();
		if ( ! $( this ).find( '[type="hidden"][name="' + submit_btn.attr( 'name' ) + '"]' ).length ) {
			$( this ).append( '<input type="hidden" name="' + submit_btn.attr( 'name' ) + '" value="' + submit_btn.val() + '" />' );
		}

		var that = this;

		$.ajax( {
			url: dologin.login_url,
			type: 'POST',
			data: $( this ).serialize(),
			dataType: 'json',
			success: function( res ) {
				if ( res._res !== 'ok' ) {
					$( '#dologin-process-msg' ).attr( 'class', 'dologin-err' ).html( res._msg );
					$( '#dologin-two_factor_code' ).attr( 'required', false );
					$( '#dologin-dynamic_code' ).hide();
				} else {
					// If no phone set in profile
					if ( 'bypassed' in res ) {
						dologin_can_submit_bypass = true;
						$( that ).submit();
						return;
					}
					$( '#dologin-process-msg' ).attr( 'class', 'dologin-success' ).html( res.info );
					$( '#dologin-dynamic_code' ).show();
					$( '#dologin-two_factor_code' ).attr( 'required', true );
					dologin_can_submit_user = $( dologin_user_handler ).val();
				}

			}
		} );
	}

	$('#loginform').submit( dologin_cb );
	$('.woocommerce-form-login').submit( dologin_cb );
	// $('.tml-login form[name="loginform"], .tml-login form[name="login"], #wpmem_login form, form#ihc_login_form').submit( dologin_cb );

} ); } );