public static Boolean UserMod(string username, structenums.USER_INFO_4 userInfo4)
{
Int32 ret = 1;
SafeNativeMethods.NetUserSetInfo(null, username, 4, ref userInfo4, out ret);
if (ret != 0) // If the call fails we get a non-zero value
{
LibraryLogging.Error("NetUserSetInfo error:{0} {1}", ret, LastError());
return false;
}
return true;
}