function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
christwin123christwin123 

Can a Community Login user access the User information throught Queries.

We have community Login users who access an Apex Page and a Class throught that Page.

Could someone please let us know if a Query Like [Select Profile.Name from User where Id=Userinfo.get userID()]  run for that Community Login User as it is accessing the User object information.

bob_buzzardbob_buzzard
Yes, you can do this - I've just added that SOQL to a controller of mine in a community and output the currently logged in user's profile name to a Visualforce page.