Skip to:
Content
Pages
Categories
Search
Top
Bottom

Skip activation page


  • rumpelstilzchen94
    Participant

    @rumpelstilzchen94

    Hello,

    Can I skip the activation page? I want users to be able to click on the activation link from the email and then get activated without having to click the “activate” button on the activation page.
    Also, it would be handy if they get redirected to their profile page after they clicked the activation link.

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

  • rumpelstilzchen94
    Participant

    @rumpelstilzchen94

    no one?


    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…


    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));

    ?>

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar