How to get the current User Profile in Apex Class?
What is the right way to get the current users profile in an apex class?
When I tried to print the following in visualforce page, i am able to get the profile name
But when i tried to print in the Apex class using
System.debug(Profile.Name), I couldn't.