Gemini Community Support Site

This Gemini community support site can be used to find solutions to product issues. You can log in using Open Id, Google Profile and even Facebook. Feel free to ask a question or browse FAQs and documentation. Product tour videos are also available along with how-to videos demonstrating key Gemini capabilities.




UserService.GetUserByName returns logged in user

api

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
photosinensis
Replies (1)
helpful
0
not helpful

Are you using windows authentication?
This was a bug in 3.5.4 (when using win auth) that was fixed in 3.6: http://gemini.countersoft.com/Default.aspx?p=2&i=3333

The workaround is to get all users.


Mark Wing
· 9108
Mark Wing