Person and address information on our website

Describes how users can store their address info in Active Directory and how NPS web authors can insert tables of such information into web pages.

Note: The solution described herein is currently disabled, because the connection of the servlet to the LDAP/ActiveDirectory server tends to fail (once and for all) after some time for reasons we do not understand and could not find despite our best efforts. Sorry. As a replacement, user information is modeled directly in NPS, which is a partially manual, but rather flexible solution.


Displaying address info: The /ldap/userinfo servlet

All of our four servers www.[mi|inf|math|fbv].fu-berlin.de have the same Java/Jython servlet running for retrieving user information from our central Fachbereich-wide Active Directory server and displaying it in form of HTML tables.

NPS web page authors can insert calls to this servlet on arbitrary web pages.

Here is how the calls look like on an NPS page

<div id="userinfo1">
  For the people list, see 
  <a class="userinfolink" jtarget="userinfo1"
     href="/ldap/userinfo?group=org_agse&columns=fullname@homepage;email@email;street,room;phone&sort=lastname&lang=en"
  >/ldap/userinfo</a>.
</div> 

You may vary the text and the part of the href attribute after the ?, but all other tags and attributes must be exactly as shown. (Exception: For putting multiple userinfo tables onto the same page, you can exchange the two appearances of "userinfo1" to "userinfo2" etc. But you must always change both of them together.)

How it works internally

NPS pages are purely static pages. However, people information is dynamically extracted from Active Directory. How can that work?

As shown above, the NPS page just contains a link. If you follow that link, you will call a 'naked' page (outside of NPS) that will contain only the people information and nothing else.

But that is obviously an ugly solution.

Therefore, the above section (because it is marked with class="userinfolink") is normally processed by a Javascript routine that you can load into the respective NPS page. This Javascript performs the call described in the href and inserts the resulting HTML table in place of the current contents of the div element.

How to active the Javascript

Insert the following in the head section of your page:

Everything else happens automatically. The code activates itself as soon as the page has finished loading.

Parameters for configuring the people information

After the ? in the href, you can use the following arguments to select what will be included in the resulting HTML table:

Available fields

Here is a table describing the columns you can have in a userinfo table:

Nr userinfo name Active Directory name "en" title "de" title
1 cn cn Username Benutzername
2 fullname displayName Name Name
3 firstname givenName Given Name Vorname
4 lastname sn Family Name Nachname
5 email mail Email Email
6 phone telephoneNumber Phone Telefon
7 shortphone   Extension Durchwahl
8 fax facsimileTelephoneNumber Fax Fax
9 shortfax   Fax ext. Fax
10 mobile mobile Mobile Mobil
11 street streetAddress Street Straße
12 room physicalDeliveryOfficeName Room no. Raum
13 buildingroom   Room no. Raum
14 ag department Work group Arbeitsgruppe
15 jobtitle title Job title Jobtitel
16 homepage wWWHomePage Homepage Webseite

Explanation of the columns in the above table:

Explaining the fields themselves (in terms of the userinfo name):

The other fields' meaning should be obvious.

Where possible, the userinfo servlet will compute some data from others, but explicitly entered data is prefered; see below.

Entering address info: The Windows 'Find people' dialog

By default, only little information is present in Active Directory for any one person. But everybody can modify his or her own Active Directory person record easily as follows:

TO DO list

The following improvements are planned to be done to userinfo in the future:

Comments

Add comments here: