0

Is there a way to find what user is clicking on a component. I have read that the $User variable is not available in Lightning. Is there a way to find out what user caused an init method to fire ?

3
  • You can check who the current user is on component load from a server side controller
    – glls
    Commented Feb 5, 2018 at 16:13
  • And that says which user has that component open ? What if multiple users have it open ?
    – MadMax
    Commented Feb 5, 2018 at 16:16
  • your controller will exectue each time a user loads the component
    – glls
    Commented Feb 5, 2018 at 16:17

1 Answer 1

2

You will have to add a server side controller to your component and use the UserInfo Class to obtain this information.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .