This code works fine within a Kentico website:
var users = UserInfoProvider.GetUsers();
for (int x = 0; x < users.Count(); x++
{
UserInfo currentUser = us
Are you sure you are referencing all necessary assemblies?
Following scenario works on my machine with configuration: Kentico 8.x, Web Application project
Reference in your Console application these assemblies from lib folder
Then copy your Connection String from Web Application's web.config to Console Application's App.config.
After that you can use this code to set custom user properties
static void Main(string[] args)
{
var users = UserInfoProvider.GetUsers();
foreach (var user in users)
{
user.SetValue("myTestString", "test");
user.Generalized.SetObject();
}
}