• master331

    (@master331)


    how to set that registered user in search page on my website can view only his history of pc repair for example?
    when i am enternig new entry i use several fields name, date, user email, device, device code, repair service.
    how to setup unique authentication that he can search only his repair history?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter master331

    (@master331)

    detailed example..
    2 signup forms
    a first me as admin enetring data:
    date
    owner( name and surname)
    owner email
    device
    code
    service

    at second form users can register and entering:
    name and surname
    email

    question is:is it possible that registered user can search only if his registered email is the same with email in first signup form?

    Plugin Author xnau webdesign

    (@xnau)

    This can only work if your “registered user” is logged in. You will need to use some code to set up your search page. You can do this in a WP page template, or use some kind of code-embedding plugin. You code would look like this:

    <?php
    $current_user = wp_get_current_user();
    
    echo do_shortcode( '[pdb_list search=true filter="owner_email=' . $current_user->user_email . '"]' );
    ?>

    That will only show results where the owner email matches the current logged-in-user’s email address.

    If your users do not have a login, you can do this using my Participant Login add-on. You will need to use a custom template to show the results.

    If you want to do it this way, please ask about it in the Participant Login support forum.

    Thread Starter master331

    (@master331)

    do you plan to extend possibilties by adding some new features? sms validation or something innovative?

    Thread Starter master331

    (@master331)

    i will try your suggestion in a few minutes, and if i develop my site i am very interested by buy some of your PRO extensions

    Thread Starter master331

    (@master331)

    @xnau

    <?php
    $current_user = wp_get_current_user();

    echo do_shortcode( ‘[pdb_list search=true filter=”owner_email=’ . $current_user->user_email . ‘”]’ );
    ?>

    what is code for another parameter? (example name and surname, or phone nuber, code)
    $current_user->user_email what is modifications on this line for my question?

    • This reply was modified 8 years ago by master331.
Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Login searching database’ is closed to new replies.