Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retrieving user id

Status
Not open for further replies.

sirugo

Programmer
Aug 1, 2000
162
SE
We have an intranet running for two groups (students/teachers).
The users all login to a Novell network before they can use any applications at all.

My idea is to retrieve the actual user id of the user to decide which intranet-page to show (php). Someone said LDAP can be used but not specificly how.

So I need some way to catch the incoming user id via php and in the php-code decide which part of the pages (menu) to show.

Can it be done? How?
 
hello sirugo

as far as i know, it is possible, but i can't say how because i haven't enough knowledge in php. But would it not be more useful, if you put all students (with all ids) in one group and all teachers in one group. I think, it would be easier to grep two groups than to retrieve the actual user id of the user and then to decide. it's also a question of time and configuration. at first, you'll have to bring all students/teachers in groups, but it's easier with two groups i think..

or did you find another solution?

greetings
julia

 
Hi

They are already in different groups but the question is how to find out (while running the loginscript) which group the current user is in.

How do I retrieve that information?
 
at first, i should tell you, i don't know how novell works;)

In Unix, I would make a cgi script in the root apache directory and something like the command above (embedded in php):

# getent groupid loginscript

then make an if/else loop, so you can decide which group it is and which pages should be displayed.

sorry, I have no more ideas how to run a script on other platforms..

greetings
xenia

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top