• Hello, So the plugin adds a password field which is fantastic however I am using this form for users to register.

    How do i make it so the password the user enters is the password assigned to them in wordpress?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author kimipooh

    (@kimipooh)

    WordPress user passwords are stored only in Hash form. This data cannot be decrypted, so the password itself cannot be retrieved.

    It is possible to check if the password entered matches the password of the WordPress user.
    For more information on this, see
    https://info.cseas.kyoto-u.ac.jp/en/links-en/plugin-en/wordpress-dev-info-en/cf7-add-password-field_en
    You can modify the check using hooks by referring to

    We do not plan to implement a function to register WordPress users directly using the data entered in this plugin.

    Plugin Author kimipooh

    (@kimipooh)

    https://info.cseas.kyoto-u.ac.jp/en/links-en/plugin-en/wordpress-dev-info-en/cf7-add-password-field_en

    Added Registering as a user on WordPress (22 July, 2021) to the above link.
    This feature was implemented using a hook in Contact Form 7. However, it is just a sample and you need to take security measures and various settings for actual registration.

    Thread Starter rob8989

    (@rob8989)

    Thanks for the reply. I am getting the following error:

    Your PHP code changes were rolled back due to an error on line 36 of file wp-content/themes/hello-elementor/functions.php. Please fix and try saving again.

    syntax error, unexpected token “=”, expecting “)”

    Plugin Author kimipooh

    (@kimipooh)

    ‘>’ character was being HTML-encoded as >. I fixed it and the error should be gone now.

    Thread Starter rob8989

    (@rob8989)

    Thank you this works. It is still not setting the password as the password the user enters.

    ‘user_pass’ => $pass, (Is there the hook that declares the new password?)

    Sorry my coding knowledge is quite limited.

    Plugin Author kimipooh

    (@kimipooh)

    $pass_field = “password2″; // In case of [password* password2] for the user password field

    In the above example, I define where to get the password from with

    $pass = isset( $formdata[$pass_field] ) ? trim($formdata[$pass_field]) : ”;

    Above code means that the data was taken from the input field set as [password* password2] using this plugin, and put into $pass.

    If you cannot understand this, it will be difficult to use a program to register users, because you won’t be able to deal with any problems.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Password not set under user’ is closed to new replies.