Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

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

  • suparni
    Participant

    @suparni

    Unfortunately nobody could help me with the problem. So I implemented a direct solution in the database.

    I redirected people to another page and adjusted the link in the activation email accordingly.

    Example link in the email https://www.abc.de/activation/?{{user.email}}

    So when this link is called, the script asks which e-mail address is passed.

    The script then searches for the e-mail address in the table “wp_users” and changes the status in the column user_status from 2 to 0.

    The user is then immediately activated by clicking on the link. The script can be integrated into any page.

    <?php

    $queryString = strstr($_SERVER[‘REQUEST_URI’], ‘?’);
    $queryString = ($queryString===false) ? ” : substr($queryString, 1);

    $pdo = new PDO(‘mysql:host=localhost;dbname=example_db_1’, ‘example_usr_1’, ‘example password’);

    $statement = $pdo->prepare(“UPDATE wp_users SET user_status = 0 WHERE user_email = ‘$queryString’”);
    $statement->execute(array(‘user_status’ => 0));

    ?>


    suparni
    Participant

    @suparni

    Unfortunately nobody could help me with the problem. So I implemented a direct solution in the database.

    I redirected people to another page and adjusted the link in the activation email accordingly.

    Example link in the email https://www.abc.de/activation/?{{user.email}}

    So when this link is called, the script asks which e-mail address is passed.

    The script then searches for the e-mail address in the table “wp_users” and changes the status in the column user_status from 2 to 0.

    The user is then immediately activated by clicking on the link. The script can be integrated into any page.

    <?php

    $queryString = strstr($_SERVER[‘REQUEST_URI’], ‘?’);
    $queryString = ($queryString===false) ? ” : substr($queryString, 1);

    $pdo = new PDO(‘mysql:host=localhost;dbname=example_db_1’, ‘example_usr_1’, ‘example password’);

    $statement = $pdo->prepare(“UPDATE wp_users SET user_status = 0 WHERE user_email = ‘$queryString'”);
    $statement->execute(array(‘user_status’ => 0));

    ?>


    suparni
    Participant

    @suparni

    Have you found a solution for this? I’ve been looking for weeks, but somehow nobody seems to know how to do it…

Viewing 3 replies - 1 through 3 (of 3 total)
Skip to toolbar