[python-win32] Getting the current user's email address
11 Dec 2002 18:27:49 -0800
It seems that this ought to be relatively simple, but I've been frustrated
at every turn I've tried. I'm running under an ASP process under IIS, which
is impersonating an intranet web client, and I want to get the user's email
I can get the user's login name with win32api.GetUserName, but I haven't
succeeded in getting from there to having ADSI get me to the right object to
ask for the EmailAddress.
If GetUserNameEx were provided in win32api, I'd be home free -- but it's not
(at least not in the 2.2.1 ActiveState distro). I've looked at the Python
ADSI documentation, but I can't decipher it enough to figure out how to get
to the user's entry, given just the login name (I haven't seen any way to
get the password, and I'm not sure it would help).
Anyone have any good words?
Don Dwiggins "The truth will make you free,
firstname.lastname@example.org but first it will make you miserable"
-- Tom DeMarco