change this solution for user principal name

Jun 4, 2013 at 5:15 PM
Edited Jun 4, 2013 at 5:15 PM
Its very rare when you will find that company has different UPN then account name. but in situation like this this solution will not work if you have configured different account name then UPN. I am trying to change this solution so it will match image name with UPN also , not only account name.
this is also posted on technet, but even after many days there is no response. any help for non developers will be appreciated.
http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/37f9ffef-9dad-4c06-89fe-6fc2e100449f