+ Start a Discussion
Developer BaseDeveloper Base 

Extending a standard controller with a controller extension - does code from extension run in user or system mode?

https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_extension.htm

"However, if a controller extension extends a standard controller, the logic from the standard controller does not execute in system mode. Instead, it executes in user mode, in which the permissions, field-level security, and sharing rules of the current user apply."

Does this mean that all code used from Standard Controller and Controller Extension run in User mode, or only Standard Controller runs in User Mode and Controller Extension runs in system mode?

I would like to extend my Standard Controller with a Controller Extension but execute the code in my Controller Extension in USER MODE.

How?
AbhinavAbhinav (Salesforce Developers) 
have you tried 'With Sharing'?