You need to sign in to do that
Don't have an account?
Anupama@28
get community user info
Hi,
We have a requirement where we need to update the communty user contact details, Is there a way to get the logged in community user information either through lightning component or community builder page or site.com page etc....
I have tried the below
> Created a VF page to get current user information and related contact information
> Created site and given link to the above VF page
> Created a community builder page and given llink to the above site
Here, If i hardcode the contactId in VF page / apex then its working fine but our requirement is to get the current logged in community user info and then fetch his/her contactId.
When i run this as community user the first step i.e. fetching user details itself is failing.
Please help me to get the requirement done
thanks in advance.
Thanks,
anupama
We have a requirement where we need to update the communty user contact details, Is there a way to get the logged in community user information either through lightning component or community builder page or site.com page etc....
I have tried the below
> Created a VF page to get current user information and related contact information
> Created site and given link to the above VF page
> Created a community builder page and given llink to the above site
Here, If i hardcode the contactId in VF page / apex then its working fine but our requirement is to get the current logged in community user info and then fetch his/her contactId.
When i run this as community user the first step i.e. fetching user details itself is failing.
Please help me to get the requirement done
thanks in advance.
Thanks,
anupama
in your apex class you can get current login user contact info by using below code i hope it helps you.
Let me inform if it helps you and kindly mark it best answer if it helps you so it make proper soltuions for others
thanks
http://sfdcmonkey.com (http://sfdcmonkey.com )
All Answers
in your apex class you can get current login user contact info by using below code i hope it helps you.
Let me inform if it helps you and kindly mark it best answer if it helps you so it make proper soltuions for others
thanks
http://sfdcmonkey.com (http://sfdcmonkey.com )
thanks for replying,
It works for normal users, but my requirement is how do i get the user info for logged in community user.
thaknks,
Anupama
this above code work as well for the community user. when you log in with any contact to communities, at this time above code get the information for the login user not the for the normal user.
try it
Can you please help me with the code for this.Since i am trying to fetch contact name and show it in lightning component but it isnt showing up!!