UserService.GetUserByName returns logged in user
Using Gemini 3.5.4.
I'm trying to find a user that's in the system so that I can get a UserID. I know his/her username. According to the documentation, the method GetUserByName(string name) will return the user object that corresponds to the user with that username.
When I call it, it does not matter what string I use as an argument--whether it's a valid user, a random string, or string.Empty, it returns the user that's running the script (currently the specified logged in user). Essentially, if I were to run the following code:
us = servicemanager.UserService;
UserEN me = us.WhoAmI();
UserEN other = us.GetUserByName([valid user name in a string]);
Random random = new Random();
while(me == other)
{
other = us.GetUserByName(random.Next().ToString());
}
Console.Writeline("It's over!"):
that loop would never terminate.
photosinensis
· 1 |
|
Tuesday, April 13, 2010, 5:46:42 PM |