Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Is SharePoint Server Object model API SPSecurity.RunWithElevatedPrivileges(delegate() run called function with the { ); with elevated previleges

$
0
0

Hi

I create Console application which do some SharePoint server task. application code used SharePoint server object model to do the task . here is my code 

 SPSecurity.RunWithElevatedPrivileges(delegate()
                {
                SPSite sitecoll = new SPSite(strUrl);
                SPWeb web = sitecoll.OpenWeb();                
                SPUser user = web.SiteUsers[strUname];                
getUserProfile(user ,web );
                });

So i wondering about function getUserProfile , is it worked with elevated privileges or with function of getUserProfile i need to add SPSecurity.RunWithElevatedPrivileges(delegate() { ); for working with elevated privileges .
              


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>