I have a web part that shows me a survey. I need to get the current user so that I can hide or show certain information for the survey depending on the current user's permissions.
SPContext.Current.Web.CurrentUser should do the trick. It has functions like IsSiteAdmin and Groups that you should be able to use.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With