Support » Plugin: Participants Database » Changing the private_id default values

  • Resolved Dunger


    I want to change private_id value, not to have a value of 5 random letters/numbers, but rather ascending.
    I mean, 1st registered user having a private_id value = 1, 2nd registered user with private_id value = 2, etc.

    I know its not recommended, but i dont need pdb_record page at all so i got it disabled.

    Is there any way to do it? I cant even find where is the code giving this random 5 signs :/

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


    Why not use the record id? It starts at 1 and increments with each new registration.

    I’ve just tried that and i have a problem, because when i am searching for:

    <input type="hidden" name="search_field" value="id" />

    the results are for a member with correct id number, but private_id is shown as a result instead of id.

    Shortcode for this page is:

    [pdb_list filter="id=0" search=true template=detailed]

    I’ve checked pdb_list_detailed and there is no single “private_id” entry in it :S

    Anyway, if Record id will work it will be all i want actually 🙂

    Plugin Author xnau webdesign


    The fields that are shown as a result of a search would not typically include the private_id unless you’ve takes steps to show it. It is normally hidden for security. So unless you’ve modified the template to show that field, I don’t know how that is happening.

    Now, whether the record ID will work for you all depends on what you want to use it for. If you want the record id to appear in lists and search results, the easiest way to do that is to specify all the fields you want shown in the list by using the fields attribute of the shortcode.

    You’ve already figured out how to integrate it into the search function.

    Great, specifing


    is working!
    I am still wondering why “private_id” was showing as a result of a search, but hopefully it wont matter in this case 🙂

    I didnt modified core files nor implemented “private_id” anywhere.

    Thanks a lot for help! It’s working perfectly now!

    PS. When i was trying to modify the code to work like described in:

    there was an error at line 7

    ‘<?php $id = key($this->records); ?>’

    I am not sure if i did something wrong, its not working in my case or its not compatibile currently. Just to let you know about the situation.

    And also thanks for the advices from over a year you gave me. I’ve noticed that i didnt thank you enough. So, THANK YOU A LOT! 🙂 Great job with your plugin!

    Plugin Author xnau webdesign


    Happy to help.

    So, what was the error you saw? I’m assuming it was because the result wasn’t an array…and empty result, perhaps? Anyway, there is probably a way to prevent the error, if you could post the error you got.

    The error is:

    Warning: key() expects parameter 1 to be array, null given in /home/beactive/domains/ on line 7

    There is also Record Not Found Error Message.

    When i turn off suppress and filter=”id=0″ the error dissapears, but first record of database is fully shown and also a list of Record IDs.

    When suppress or filter=”id=0″ is on, searching is working (i mean, despite error), but its showing full result and i cant find a way to show only selected fields :/ (eg. name and adress)

    Plugin Author xnau webdesign


    Yes, well it’s not an error, so it is working. You just need to suppress those warnings getting displayed, something that is done in your PHP settings. You can bulletproof your template by using this on line 7:

    <?php $id = is_array($this->records) ? key($this->records) : 0; ?>

    There is no error/warning now, but Record Not Found Error Message is still showing and still cannot force it to show only specific fields as a result.
    I dont want to bother you with this, it’s also good even without instantly showing results as a single record. It’s just one more click for people, so its like cosmetic thing.

    Once again, great job with this plugin!

    Plugin Author xnau webdesign


    Hmm…I think I’ll understand better if I see the page in action. Can you share a link? You can email me if you want it private:

    Hello xnau,

    Great plugin, fits perfect my needs.

    I would like to insert two leters MU- before the five characters random combination such as: MU-M4JTT to be included in the private ID link, where “MU-” is a fixed character set that will be the same for all the IDs. Which file do I have to work on to have it running?

    Paulo Lopes

    Plugin Author xnau webdesign


    Hi Paulo,

    Generally, it’s best to start a new topic with your questions, makes it easier for other to find the info.

    I don’t support making changes to the core files, so if you want to do this, you’ll be on your own.

    There is a function that creates the security key called generate_pid() in the main script.

    Thank you xnau, I will replace the question as a new topic.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Changing the private_id default values’ is closed to new replies.