• Resolved vanmol

    (@vanmol)


    Dear Roland,
    1) for testing purposes I would like to send a requested link not to the email address that is part of the record, but to a ‘test email address’. This way I can test the setup without disturbing the users already in the database.

    2) the link in the email is //website/pdbrecord?pid=ABCDE. I would like to replace that with //website/pdblist?search_field=code&value=ABCDE. (code is an extra field that I added, usually equal to private_id).

    Could you point me in the direction where to look to make these things happen?

    thanks in advance
    Peter van Mol

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author xnau webdesign

    (@xnau)

    Easiest way to test your private link recovery is to use a test record that uses an email address you control.

    To add to the URL that is provided for the private link, you can use the pdb-record_edit_url filter. It’s pretty simple, it just gets the full URL, you can easily tack your additional variable on at the end. (order of the variables doesn’t matter).

    Thread Starter vanmol

    (@vanmol)

    Thx Roland,
    The reason I want to adapt the email address is that I want to test a few of the records that are already in the database (total ~700).

    With your hint of record_edit_url filter I was able to solve my issues.

    <?php
    add_action(‘pdb-before_send_retrieve_link_email’, ‘pdb_myemail’);
    function pdb_myemail ($s) {
    $s->recipient=’[email protected]’;
    return ($s);
    }

    add_filter (‘pdb-record_edit_url’, ‘pdb_myurl’);
    function pdb_myurl($s) {
    $s=str_replace (“record”,”list”,$s);
    $s=str_replace (“pid”, “search_field=code&value”,$s);
    return ($s);
    }
    ?>

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

The topic ‘tweaks for request_link’ is closed to new replies.