0

I need get the user id logged in a web page community site.com (not is a VisualForcePage) in this page I need the user id and others user's fields.

https://i.stack.imgur.com/Wt8dm.png

0

I dont think you can get it from the component or client side you need to query the information from server side with all the fields you want and pass it back to the lightning component.

Below syntax can be used as a starter in apex to get user id

UserInfo.getUserId() 
  • Thanks, where is the better place to allocate this code? – netovs Jul 28 '17 at 19:31
  • Run it server side in your apex controller – RedDevil Jul 29 '17 at 6:19
  • No, no, this page it's not a visual force page, this page don't have direct relationship with the Controllers at least I don't know how this can be possible, this is in Community - Generator - All communities it's only a visual layer . . . – netovs Jul 31 '17 at 14:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.