• Resolved Docwatsons

    (@docwatsons)


    I am attempting to build a set of “extra information” forms for my WP users. I get basic WP registration and some additional demographics from WooCommerce, but I need more bits of information about the users. I created a table “CompanyContact” from which I want to make a page showing and allow editing the information only pertaining to the logged-in user. I was able to get the WP user_login to populate a page I’ve set up in the Data Designer, with $$USER$$ as the default value. I can’t seem to get the WHERE clause correct, however. If I enter user_login=$$user$$ to the WHERE clause field on the page, I get no records. If I leave it blank, I see all the records I put in to test. If I use text in quotes of an actual user login value, in place of the $$USER$$, it produces the filtered records. Any suggestions how to get this WHERE clause correct would be much appreciated. Also, whether and what kind of link there should be between wp_users and CompanyContact.

    I would have preferred pulling in the wp_users ID instead of the user_login value, but I can work with it.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 16 through 18 (of 18 total)
  • Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi Ben,

    I created a new video that explains how you can give users access to the dashboard. You can find the video here:
    https://wpdataaccess.com/docs/documentation/data-projects/give-user-access-to-dashboard/

    I also added a new environment variable $$USERID$$. You can use it in the same way as the $$USER$$ environment variable. $$USER$$ uses the user_login. $$USERID$$ uses the user_id. You suggested you would prefer to use the user_id. You now have a choice.

    I’m finishing up the documentation and hope to release version 2.7.0 before the end of this week. Version 2.7.0 has a few more additions you will like. I’ll let you know 2.7.0 is available…

    Best regards,
    Peter

    Plugin Author Passionate Programmer Peter

    (@peterschulznl)

    Hi Ben,

    I released version 2.7.0. Is contains the environment variable $$USERID$$ and some new features to manage user roles and access.

    I removed the video that explained how you can give users access to the dashboard and added a new one which described the process in much more detail. You can find it here:
    https://wpdataaccess.com/docs/documentation/data-projects/managing-roles-and-user-access/

    I’m closing this topic. Please feel free to open a new topic if you have a question or a new feature request.

    Best regards,
    Peter

    Thread Starter Docwatsons

    (@docwatsons)

    Peter, thanks very much for your amazing work. I will make great use of it, I believe.

    With appreciation,
    Ben

Viewing 3 replies - 16 through 18 (of 18 total)
  • The topic ‘Filter with $$USER$$’ is closed to new replies.