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 ?
-
You can check who the current user is on component load from a server side controller– gllsCommented Feb 5, 2018 at 16:13
-
And that says which user has that component open ? What if multiple users have it open ?– MadMaxCommented Feb 5, 2018 at 16:16
-
your controller will exectue each time a user loads the component– gllsCommented Feb 5, 2018 at 16:17
Add a comment
|
1 Answer
You will have to add a server side controller to your component and use the UserInfo Class to obtain this information.