This topic is locked

getting logged in username

2/26/2006 7:16:12 AM
PHPRunner General questions
T
thesofa author

Hi, please forgive the simplicity of the question, I have been thrown in at the deep end to solve a problem.

I am the network technician for a school with 60 teachers. We have a detention recording system which currently runs from an access table on the servers and a client on each staff desktop.

This allows staff to view existing detentions, add new ones, mark old ones as completed and various other functions.

In the add new detention form in the access database, I have set various fieds with default values, such as "DateGiven" to the currnt date, "TimeGiven" to the current time and "PersonGiving" to the name of the person logged into the windows on the network.

I realise that I SHOULD be able to set default values for the date and time fields, I shall have to find out how later, BUT I really do need to find a way of getting the logged in user name to prevent teachers from giving lots of detentions in the name of another teacher, just to make them look as if they had no control in class. I also need to be able to use this logged in name for filtering to permit only those detentions given out by that teacher to be seen by him/her.

All help will be much apprecited.

BTW, PHPRunner is the bet bit of software I have seen for years.

Many thanks Sergey

Sergey Kornilov admin 2/27/2006

Hi,
you can do it using Advanced security settings. Go to the Advanced security settings dialog on the Security Tab and select User can see and edit theit own data only, then set "PersonGiving" as OwnerID field.

To set default values go to the Edit format dialog on the Formatting Tab.

T
thesofa author 2/27/2006

Hi,

you can do it using Advanced security settings. Go to the Advanced security settings dialog on the Security Tab and select User can see and edit theit own data only, then set "PersonGiving" as OwnerID field.

To set default values go to the Edit format dialog on the Formatting Tab.



I was trying to get php to pick up the windows user login name without having to have another login to the database, using AD as the authentication database. Is this possible?

Sergey Kornilov admin 2/27/2006

I suppose it's not possible.

PHP doesn't have Active Directory support.

T
thesofa author 2/27/2006

I suppose it's not possible.

PHP doesn't have Active Directory support.



OK, so is it possible to get the name of the logged in Windows user from the client machine?

Sergey Kornilov admin 2/28/2006

No, it's not possible.
You can specify username manually, i.e. give ask user Bob to open URL:

http://mysite.com/mypage.php?user=Bob



and give Mary this one:

http://mysite.com/mypage.php?user=Mary

T
thesofa author 2/28/2006

No, it's not possible.

You can specify username manually, i.e. give ask user Bob to open URL:
and give Mary this one:



OK, Thanks