Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

How can I get the current Editor of an list Item in SharePoint 2010 during ItemUpdating?

Problem is properties.AfterProperties["Editor"].ToString() throws and Exception cause it's null. This properties.ListItem["Editor"].ToString() is useless cause I get the Editor which made changes the last time.

Any guess how I can achieve this during the Updating?

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

You can use properties.UserLoginName to get the current use. Note if you running your code in RunWithElevatedPreveliges, you need to write above statement before that.

share|improve this answer
    
I used this in my case properties.UserDisplayName –  Markus Schmitt Jan 16 '13 at 15:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.