

3. If you would like to search for username instead of department, you will need to change the following lines
<div style="float:left;$labelWidth"><label class="$!labelClass" for="#namespace('ou')">$action.getText('ou'):</label></div>
<div style="float:left;$inputMargin"><input class="$!inputClass" id="#namespace('ou')" name="search_ou" size="$inputSize" /></div>
through swapping Department (ou) for Username (cn) and search_ou for search_cn:
<div style="float:left;$labelWidth"><label class="$!labelClass" for="#namespace('cn')">$action.getText('Användarnamn'):</label></div>
<div style="float:left;$inputMargin"><input class="$!inputClass" id="#namespace('cn')" name="search_cn" size="$inputSize" /></div>

1. Open the portlet Directory. On the tab Advanced, check the box Search template.
2. Click the button Edit template.

If using the internal directory service (Apache DS) you need to remove the access control check in the detail template in order to see the Edit link. On row 19 you remove the row:
#if ($action.getEffectiveRights($user))
and the following #end on row 24.
<div style="float:left;$labelWidth"><label class="$!labelClass" for="#namespace('givenName')">$action.getText('givenName'):</label></div>
<div style="float:left;$inputMargin"><input class="$!inputClass" id="#namespace('givenName')" name="edit_givenName" value="$!action.getAttribute($user, 'givenName')" size="$inputSize" /></div>
<div style="clear:left"><p style="display:none"> </p></div>
<div style="float:left;$labelWidth"><label class="$!labelClass" for="#namespace('ou')">$action.getText('ou'):</label></div>
<div style="float:left;$inputMargin"><input class="$!inputClass" id="#namespace('ou')" name="edit_ou" value="$!action.getAttribute($user, 'ou')" size="$inputSize" /></div>
<div style="clear:left"><p style="display:none"> </p></div>
<div style="float:left;$labelWidth"><label class="$!labelClass" for="#namespace('telephoneNumber')">$action.getText('telephoneNumber'):</label></div>
<div style="float:left;$inputMargin"><input class="$!inputClass" id="#namespace('telephoneNumber')" name="edit_telephoneNumber" value="$!action.getAttribute($user, 'telephoneNumber')" size="$inputSize" /></div>
<div style="clear:left"><p style="display:none"> </p></div>
<div style="float:left;$labelWidth"><label class="$!labelClass" for="#namespace('title')">$action.getText('title'):</label></div>
<div style="float:left;$inputMargin"><input class="$!inputClass" id="#namespace('title')" name="edit_title" value="$!action.getAttribute($user, 'title')" size="$inputSize" /></div>
<div style="clear:left"><p style="display:none"> </p></div>