Firestore: find element by id from Firebase - firebase

I have created an user from my app in Firebase:
and with it I also created some elements that I store in Firestore:
So as you can see, that elements is linked to this new user
If I go to Firestore db, all this elements are created ok but I don't know how to search by id, only by fields that I created for that user (email, name, etc):

As per Franks' answer, you can find a document/element with a specific ID by entering it in the little address bar/breadcrumb trail that sits above the data structure in the console. Pencil icon on the breadcrumbs are hidden by default, hover on the breadcrumbs for it to appear. By clicking on it, address bar will be shown. Enter a / and then the ID of the document/element.
For more detailed information, you can refer to this thread.

Related

Changing of profile picture and username in flutter

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.

Drupal: Display Custom User Profile Fields in a Block on All of Their Published Pages

I have created a role, and have added additional fields to their profile using Profile 2. The fields are part of the location module, and are just basic contact info (address and phone number). They are also able to chose a name, which is used in the url for both their profile and content.
So, when a user creates their account, the url is site.com/their-name. When the user adds content the URL is site.com/their-name/content.
My goal is to display their contact info in a block on all pages they publish. I was able to do this for their profile page with the following view (see attached image). However, I would like this block to appear on all pieces of content that they author.
I ended up being able to figure it.
Add Content:Author relationship.
Add (author) User: Profile relationship.
Add contextual filter (author) User: Uid
WHEN THE FILTER VALUE IS NOT AVAILABLE > Provide default value > Content ID from URL
Select "Also look for a node and use the node author"

How to remove a web site from google analytics

I am Administrator of several web sites on google analytics.
Can i delete some of them?
If yes, how?
Many of you suggested me to remove my profile. So my doubts are:
1. I am administrator of several items. I want remove just some of them.
2. If I remove my profile I will lost all items?
Here's an updated answer, as of Sept. 2013. This took me awhile to figure out.
Go to the Admin tab.
In the middle column, select the web property that you want to delete from the dropdown.
In the right-hand column, click on "View Settings." ("Property Settings" in dec. 2015)
At the bottom of the next page, select "Delete this view."
It will warn you that you're about to delete all of the data associated with this property. If you're sure, confirm.
Done!
UPDATED ANSWER
Google Analytics Admin panel has 3 panels, wherein deleting can be done on any of the following :
Account (Contains multiple properties, and views)
Properties (Contains Views, a subset of Account)
Views (subset of properties)
Deleting an Account
Deleting the account, will remove all data pertaining to that account, along with all properties/profiles it contains. This is (usually) as good as removing the entire website data.
To delete the account, follow the following steps : (refer to image below)
Choose the account you want to delete.
Click on Account Settings
Bottom right, a small link that says delete this account.
You will get a confirmation, if you are sure to, click Delete Account
It will give you details, and will confirm deletion (and provide additional info like to remove GA snippet on your website, etc)
Note : If you have multiple accounts linked with your login, the other accounts are NOT touched, only this account will be deleted.
Deleting a property
Deleting a property will remove the selected property, and all the views it holds.
To delete a property, delete all views it contains individually (see below for deleting views)
Choose the property
All profiles related to that property appear on the right
Delete all the views related to the property individually (details in next section).
Deleting a View (profile)
Deleting a profile will remove only data pertaining to that view, if there is a single profile, the property is automatically deleted.
Choose the profile you want to delete
Click View Settings
Click on delete View (Bottom right)
Click Confirm, and that view will be deleted. If there is only a single view in the property, that property gets automatically deleted.
I want to keep the data, but not see them in the list
Sometimes you have a lot of websites, which you want to keep the data, but remove them from the list, since you don't view them often. I thought of a workaround, in case you do not want to delete the data.
Use another account.
Say, your primary account is A, and you make another account B.
Make B an administrator from A
Remove A
Since A was your primary account, you no longer will be able to access it from the list!
And you still have your data saved, just that you'll have to log in via the other (spare) account.
Previous Answer :
These are the steps to delete a profile from Google Support page :
Delete profiles
Remember, too, that when you delete a profile, you also delete all data associated with that profile, and it is not possible to retrieve that deleted data.
To delete a profile:
Click the Admin tab at the top right of any Analytics page.
Click the account that contains the profile you want to delete.
Click the web property from which you want to delete the profile.
Use the Profile menu to select the profile.
Click the Profile Settings tab.
Click Delete this profile at the bottom of the page.
Click Delete in the confirmation message.
Updated Answer (July 22, 2015)
The solution to delete an Account/Property/View is still very similar to #Pranav 웃's answer. Google has just moved a few things around, so I thought I would update.
Step #1
Click Admin Tab at the top of the page
Step #2
Once you are on the Admin Page, You need to decide if you want to delete the Account, Property, or View. Make sure to select the desired Account, Property, or View from the Drop Down Menu.
In the following pictures, I will show you how to delete the Account, which removes all information including Properties and Views under that particular account.
Click Account Settings to remove Account, Property Settings to remove Property, and View Settings to remove View.
Step #3
On Account Settings, you will notice a button 'Move to Trash Can'. You will click this to remove the Account, Property or View. You will have to verify Moving the Account to the Trash Can on the next page/picture.
Step #4
When you have verified this is the account you want to delete, go ahead and select 'Trash Account'.
Note: When you Trash an Account it moves all the information to Admin/Account/Trash Can, where it can be recovered within 1 month. Keep in mind that every Account has its own Trash Can. Once that time has lapsed the Account, Property or View will be deleted FOREVER!
Hope this helps someone in the future, since I just struggled trying to figure it out even though its pretty simple now.
To delete a web property, you simply need to delete every profile within the property. Once the last profile has been deleted, the web property with cease to exist in the GA account. That's all there is to it! -- Source
After Much Fannying about, deleting this that etc, I found the way to delete a "website" from your list (which is, in fact what the original question was - minus all the flaffing) is
Select the Account (Website) that you want to delete
In the first column (left hand one)
Click Account Settings
Down the bottom, it says Delete this account.
That's it… Done.
Remember: for this exercise only Account means Website.
You can also do in this way :
select your profile then go to admin => in admin second column "Property" select the site you want to remove => go to third column "view settings" clic => on the right bottom you ll see delete the view => confirm and it s done , have a nice day all
Feb 2016 version: Admin tab, then select Property in the middle column, click Property Settings, then the Move To Trash Can button at the top right. No need to delete individual views.
Update 26/03/2016:
Instead of a link in the bottom right corner of the Settings form, the delete button is moved to the top right corner, saying:
Move To Trash Can
When you click on it, it will ask you for confirmation and move it to Trash Can.
What the OP wants to do, is delete additional properties in his Google analytics.
Properties that are not his but belong to someone else.
Apparently, the only way to do this, is to contact the owner of that website who is the administrator, and asked them to remove you.
Or you can just create a new Google account, and add your properties to the new account.
None of these are real good solutions. Thank you Google for caring so much about SEO people.
To add insult to injury, if you go over 25 accounts, you must contact Google to get permission to add another.
Lesson learned: Do not add other peoples websites to your Google analytics account. Create a separate account so that if you have to start over, you don't lose any data from your websites. It's also good to have more than one Google analytics account.
AS of 2018
Login to your analytics account
Select the account/property you want to delete
Click the button. (left side bottom menu)
Click on property settings
To the right you will see Move To Trash Can Click on that
You will see the bellow screen. click on Delete Property button
or if you want to delete the account
follow the same steps, but this time click on the Accoutn Settings tab see below
Now Click on Move to Trash Can (button to the right)
when you see the next screen confirm to delete the account by clicking on the Trash Account button.
How to delete a website from google analytics

drupal 6 VIEWS - I'm stumped

I've created a view (Drupal 6) that gets put on the users profile page.
The view is supposed to list all the images that the user has uploaded. However, the view is showing every uploaded image by all users.
(When a user uploads an image, it first gets approved by me, and then posted by me and displayed on the homepage with a credit to them and a link to their user profile -- so they are not the "author" of the post, I always am.)
How can I limit the photos displaying on their user profile to just show the images uploaded by that particular user?
Thank you.
Use arguments handling: add argument - User ID, check "if argument not provided" and select php code: return arg(1); // if views shown as block and you want to show it in user profile, path will like user/UID, so arg(1) return UID.
2Ted: hello Ted! php code will absolutely secured, if you will check it, for example via is_numeric() function. Also users cann't get any images, becuase Views wil use Block display, and you cann't provide for this arguments directly.
2user967969: Additionally about approving: You can create second field, where you will store user profile UID. So for my above text you should use this field for argument handling, instead of user uid.

display all item refere by nodeaccess_userreference module

i use http://drupal.org/project/nodeaccess_userreference for refer node user to user.
users can see title of node in the box in my account but display all node i want expire node in boxes in my account users or
how to create views and show title of node with filter by user reference and expire in special time
thank you
Uph... you need to be more clear.
Regarding the expiry, you can use Rules and regarding the view I was not able to get your requirement.

Resources