Invalid password while putting correct

  • Unknown's avatar

    I am trying to use the connect with store using our application. So I have integrate the code in one of our WordPress plugin. But when I tried to login into the website programmatically it’s giving the error “Invalid Password”, while with the same password I can login into the store from frontend. I am using below code:

    if (preg_match(‘/b[A-Z0-9._%+-]+@[A-Z0-9.-]+.[A-Z]{2,4}b/si’, $username)){
    $email = wp_authenticate_email_password(‘WP_User’, $username, $password);
    }else{
    $user = wp_authenticate_username_password(‘WP_User’, $username, $password);
    }

    Can anyone help me to figure out this?

    Thanks,

    The blog I need help with is: (visible only to logged in users)

  • Hi there!

    You won’t be able to use plugins or custom code on a free WordPress.com site, so I think you’re working on another one, not demowebg.wordpress.com, is that right?

    To get support for self-hosted WordPress sites, you’ll want to go to https://wordpress.org/support/forums/.

    Here we can only advise on issues directly related to our platform.

  • Unknown's avatar

    Hello, Yes you are right I am asking this question for one of my customer. Can you please help me to figure out this issue? As programmatically login user authentication code is not working.

  • Hi @bpwynn,

    While it’s possible to use code on a Business plan or higher, we’ll first need to know the site’s URL to confirm that it’s hosted with WordPress.com.

  • The topic ‘Invalid password while putting correct’ is closed to new replies.