Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter nathanhkn

    (@nathanhkn)

    That’s not exactly what I wanted. I have a custom login method. Do you know if I could create a bool that is specific to the users session. Like, I could set the bool to true when they login, and when they leave the page the bool is reset to false?

    Thread Starter nathanhkn

    (@nathanhkn)

    Thanks, the var dump showed the variable with the dollar signs! Though sadly nothing seemed to change with the functionality. What I’m trying to do, is I have the hashed password in the database and I have the user enter the password into a form. Im trying to check if they entered the correct password. To do this I am using the password_verify() function, which is built into PHP.

    $output = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM profile WHERE Name = '%s';",$name ) );
    $hashedPass = $output->Password;
    $result = password_verify($password, $hashedPass);
    

    For some reason $result never is 1. Unless I am checking for it to be 1 wrongly.
    Heres the if statement:
    if($result == 1){

    Thread Starter nathanhkn

    (@nathanhkn)

    Okay thanks! Simple question, how would I delete a row in my database, from my plugin? I know it’s $wpdb->delete(); but I don’t what to put for array $where

    Thread Starter nathanhkn

    (@nathanhkn)

    Thanks, I think my code gets a json. For the wp_insert_attachment would my first parameter be $cell_value? And I’m guessing wp_insert_attachment can go into any of my functions.

    Thread Starter nathanhkn

    (@nathanhkn)

    Thanks! I don’t really know how to do that, but I had another idea. Is there a way that when the form is submitted the name is saved to a variable that is accessible by other plugins and on different pages. So instead of passing the name through the shortcode, the plugin just gets the variable for the name.

Viewing 5 replies - 1 through 5 (of 5 total)