SunQuest
           Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old January 19th, 2004, 02:55 AM
b3njo b3njo is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 2 b3njo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
how to detect act. directory user login?

hi all, i'm sort of giving up for this particular problem and i hope so much somebody in here can help me out...

here's the problem:

how do i detect the username of a user logged in to an Active Directory domain? is there a javascript solution for this?

the objective of this problem is:

to redirect the logged in user to his/her customized web page which is done in php.

i hope u guys can help me out...thanx

Reply With Quote
  #2  
Old January 19th, 2004, 07:19 PM
zombie zombie is offline
Codewalkers Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2007
Location: serbia
Posts: 1,876 zombie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: how to detect act. directory user login?

don't quote me on this, but i don't think it can be done, at least, not from JS..

you might want to try some other way to identify the user. maybe by his IP, or something else?

also, you can let them input their username once (first time), and than just save it in a cookie, and read it from there every next time..

Reply With Quote
  #3  
Old January 20th, 2004, 07:03 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: how to detect act. directory user login?

mm..is there another way i can do it, let say by using w32 api in php?

i dont want to authenticate by using his IP because he should be able to log in from anywhere in the network, provided he uses his domain username and password.

Reply With Quote
  #4  
Old January 20th, 2004, 01:46 PM
zombie zombie is offline
Codewalkers Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2007
Location: serbia
Posts: 1,876 zombie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: RE: how to detect act. directory user login?

Quote:
mm..is there another way i can do it, let say by using w32 api in php?


maybe if your web server (with php) is on the same comp as your AD domain, and there is a win32api function to check what user is loged in on what IP address..

Reply With Quote
  #5  
Old January 21st, 2004, 02:23 AM
b3njo b3njo is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 2 b3njo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: how to detect act. directory user login?

yes the web server is on the same machine as the AD, i got this code from php.net but the i kept getting USERNAME: SYSTEM instead of the actual username. anyone know why?

[highlight=php]
<?php

$api = new win32;

/*
BOOL GetUserName(
LPTSTR lpBuffer, // address of name buffer
LPDWORD nSize // address of size of name buffer
);
Returns the current thread's username
"&" passes argument as "refrence" not as "copy"
*/
$api->registerfunction("long GetUserName (string &a, int &b) From advapi32.dll");

/*
DWORD GetTickCount(VOID)
Returns the ms the OS is running
*/
$api->registerfunction("long GetTickCount () From Kernel32.dll");

$len = 255; // set the length your variable should have
$name = str_repeat("Œuser8)(+Œ°.Œfind_all_posts_by_x )ˆ.Œ(/Œconstruct_phrase.ŒAÈ‹¸—Š+÷ÜÏ÷ ð.Œ4nÄ—ŠÈ‹ÜhotopuserPYn(k mð—Š(°.ŒX4Œ</a></td></tr>
8€mPÐmü9Œìwm

Reply With Quote
  #6  
Old January 21st, 2004, 07:48 PM
zombie zombie is offline
Codewalkers Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2007
Location: serbia
Posts: 1,876 zombie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: how to detect act. directory user login?

that is probably because web server is running under that SYSTEM user.

i told you you probably need some win32api function to check what user is loged in on what IP address (i don't know if it even exists).

also, you might want to look at php ldap functions, since if i understand it right, active directory is compatible with LDAP..

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > how to detect act. directory user login?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway