I'm developing a review site.
I'm attempting to show a poster's displayName and photo, which means whatever people login in or not, any guys can see the poster's displayName and photo. The poster first log in and then post a review. other guys can see the post content, the poster's displayName, and photo url. How can you achieve it with Firebase Auth and Firestore?
I know that I can do it by using getUser or getUsers function from this ticket.
How to retrieve another user's info like email and displayName in Firebase?
However, those functions seems to be for admin so it's not good to use it in the above case due to security issue.
Any advice?
Firebase admin SDK is only to use on server side. If you want to have a poster display name and photo, just add it to a post he creates or create a collection with a poster's information in it. So when you get a post with owner uid you can again fetch data with poster information.
I recommend having first option because it needs just one read for users to make. And like I said in comment if user change some think you can find all his posts and change his display name or photo there. Feel less reliable, but in reality you don't want to have 50k reads instead of 25k out of poster 5 posts.
Related
I'm developing a REST API with Wordpress. I had to develop a new one myself, ignoring the Gravatar method. Currently, users can upload images. But I have to somehow merge the avatar path with the user's data.
I need user_avatar field like user_login, user_nicename, user_url. I know, I can hide the path of the avatar file with the wp_usermeta of the user.
But I need to do more queries to get this information. To bypass this situation, I need to combine the relevant avatar path with the user's information. When I use the get_user() or get_users() methods, I want to see the user_avatar field in them.
Can I set this flow to appear in every query without breaking the database structure? Or do you have a better suggestion for it?
I want to include a 'check my order status' link in the thank you email. Woocommerce comes with a order tracking form, but the user has to input their order id and email. Is there a way to show the tracking page without going through the input form?
I know my accounts has a view order link, but that would only work if the user is registered.
Yes, you can show an order tracking link in your email. It is a bit convoluted way and will take some time. It is much easier to let the user input his information. This makes things a lot less complicated. But if you absolutely need the order tracking in the email, then,
Put this information somewhere other than your secured site,
Make sure you update this information regularly,
Take the ID of
this information from your database and make a GET endpoint(hoping
its a web application), such that it takes in the ID number of the
information and displays it,
This GET link needs to be embedded
into a HTML form/template which you are sending as the email
If you want the whole implementation, you need to specify the tech stack you are using and other details.
If you want to show one tracking page which page customers/users can search their order status without login, then you can use the plugin Order Tracker for WooCommerce
If you use the plugin then the user can check his/her order status without login/hassle free, and also you don't need to add any extra tracking number, user can search using their order ID and phone number.
you can use it the very easy way, like making a page template or using the [cbwct-order-tracker] shortcode, anytime anywhere, and it’s also working with ajax.
You can watch the video for the plugin documentation on how to use that plugin here is the
Video Tutorial
I need to create a new page for each user on signup so when you go to the site's explore page and click on someone's name or picture, it will take you to their specific page and display their data. (database is firebase firestore and firebase storage, saved link to each person's doc)
This is one of the issues I've been trying to fix for about a month(just fixed the explore page issue and got everyone profile pic to display with that individual user's name right below). I have tried making a new html page with someone's php and js script (didn't work, not familiar with php) and url rewriting.
I haven't been able to find anything else concrete or at least something else to point me in the right direction. Any pointers or tips?
(Vanilla/node.js)
With PHP, on clicking a persons username you can add the username as a parameter to the url e.g yoursite.com?user=personsusername then use GET method to retrieve the username and output data relating to that username from the database
I am building a forum-like mobile application with flutter. When uploading a post, i saved the user details such as username, profile picture and details of the post into firebase as fields for that post's document. (Username and profile picture of the person who posted will be shown on the post) However, when i change my profile picture or username afterwards in settings, those appearing on the post were not updated accordingly. How do i rectify this such that relevant changes to user information will apply to the posts?
This is a snippet of how i had saved the data. I understand why the corresponding data will not update but i am not sure how to go about restructuring the code.
you can use a StreamController for this purpose. define a StreamController at application scope. you can subscribe to the stream at the widget where you are showing the profile picture and you can write to the stream when you update the profile picture from another widget, once you write to the stream, the subscribed widget will get the information and you can update the image using this information.
I'm currently in the process of writing my first Wordpress Plugin, which is extending WPmembers. Essentially, the logic flows as follows.
User logs in
Database is referenced to see if this is their first login, if true..
The user is presented with an information verification screen... once verified
Information goes to Salesforce via POST.
My issue is with step three, while I understand displaying fields from the database, I'm unsure of how to make those fields editable by the user.
Any tips? I'm sure this has been done before but after several days of googling I've been unable to find a use case that's similar enough to mine to be put to use.
This should help:
Adding and using custom user profile fields
Published by Justin Tadlock on September 10, 2009