You need to sign in to do that
Don't have an account?

How to get the email address of the logged in user?
I know i can do the following to get userid,firstname,lastname by using the static UserInfo class. But there is no method to get Email address. How do i get email address in a controller??
String userId = UserInfo.getUserId();
String firstName = UserInfo.getFirstName();
String lastName = UserInfo.getLastName();
I know i can do {!$User.Email} but that would only be in the visualforce pages.
How do I get the email address of the logged in user in controller.
The workaround is to use a query to get back the email from the username.
Hope this helps
-philbo
I would agree with you on all other cases that the Id is better except this one.
And in this one it's either or.
Usernames in salesforce.com have to be unique.
Thanks..
It helped me..
Cheers..
How to get the all of the logged in users for particular salesforce account? PLZ help me
Hi,
Through this we can get the email of the current loggedin user.
UserInfo.getUserEmail()
Thanks
Praveen Murugesan
UserInfo.getUserEmail()
work fine.