how do Login with query string? Test or user in in DB (2 posts)

  1. siknoidas
    Posted 2 years ago #


    I wanna create simple query string to check or user is registred in wordpress site or no. I need this for apps communicate with WP DB.

    How create something like - wp-login.php?log=testuser&pwd=password ?

    I just need get output from WP just - OK or NO (Ok - let in)

    Tryed json, but it don't have that function. Or i missed?

    Thank you.

  2. Bob Cristello
    Posted 2 years ago #

    If you are just looking to see if the user is registered, you only need the username and not the password. This piece of code will work.

    $wp_user_id = username_exists( $wp_username );
    if ( !$wp_user_id ) {
    		//no user found
    	} else {
    		//user found

Topic Closed

This topic has been closed to new replies.

About this Topic